Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

processEpic Continued #371

Merged
merged 60 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
c0aec61
Undo workaround with short-circuiting operations (#269)
jcp19 Mar 14, 2024
e1465b5
increase timeout for epic (#278)
jcp19 Mar 17, 2024
f89f635
experiment with disabling NL (#265)
jcp19 Mar 18, 2024
9963750
Drop unnecessary annotations in `Run` (#279)
jcp19 Mar 18, 2024
fce03a3
bring changes to the io spec to speed things a little (#281)
jcp19 Mar 18, 2024
4248146
Add config for overflow in the CI (#247)
jcp19 Mar 18, 2024
c6db8fd
Reduce permission amount to buffer for decodeFromLayers (#285)
Dspil Mar 25, 2024
97115c6
cosmetic changes (#286)
jcp19 Mar 25, 2024
e8bdfc6
Fix warning in the CI (#288)
jcp19 Mar 28, 2024
1e60830
Update gobra.yml to disableNL (#289)
jcp19 Apr 2, 2024
2bc193b
simplify Decoded.Reverse (#295)
jcp19 Apr 2, 2024
090baff
Cherry-pick #4483 from `scionproto/scion` (#292)
jcp19 Apr 3, 2024
45323db
change permissions amount for decode SCMPTraceRoute (#299)
mlimbeck Apr 3, 2024
42bde11
First batch of changes from PR #248 (#306)
jcp19 Apr 5, 2024
a8ff113
Add checks for termination modulo blocking (#309)
jcp19 Apr 10, 2024
45d3639
Verify the IO behavior (a.k.a., basis PR) (#248)
Dspil Apr 12, 2024
7b47f91
Update names of functions according to the changes in the IO-spec (#314)
mlimbeck Apr 13, 2024
53f9359
Cleanup unnecessary code in the stdlib formalization (#315)
jcp19 Apr 15, 2024
df05f90
backup (#324)
jcp19 Apr 18, 2024
8d708b6
Remove more names (#325)
jcp19 Apr 18, 2024
598749b
Disable conditionalizePermissions (#319)
jcp19 Apr 18, 2024
bc81806
Refactored Widen-lemma (#327)
mlimbeck Apr 18, 2024
e5d6d22
enable chop 10 in the CI (#328)
jcp19 Apr 18, 2024
410465b
drop assumption in processPkt (#318)
mlimbeck Apr 18, 2024
764d862
fix termination measuer (#329)
jcp19 Apr 19, 2024
7ddba09
change triggers in absPktWidenLemma (#330)
Dspil Apr 19, 2024
429d007
Drop Assumption in validateEgressID (#326)
mlimbeck Apr 19, 2024
b8edbb1
router: forbid bouncing packets internally (#4502) (#332)
jcp19 May 2, 2024
c59815f
Proof of Internal Packet Bouncing fix (#4502) (#333)
mlimbeck May 6, 2024
3defe57
bring changes from #243 (#335)
jcp19 May 6, 2024
6626dfc
Drop `trusted` annotation in method (#339)
jcp19 May 7, 2024
31d2221
IO-spec lemmas (#334)
mlimbeck May 7, 2024
37fe92f
Enable `conditionalizePermissions` for the `router` (#340)
jcp19 May 7, 2024
e939e6d
Refactoring of absPkt (#341)
mlimbeck May 9, 2024
6a8228a
Proof of incPath (#344)
mlimbeck May 15, 2024
af719ce
simplify path/scion (#346)
jcp19 May 21, 2024
53f8e30
Verify assumptions in SCION.DecodeFromBytes (#345)
mlimbeck May 21, 2024
2c59987
Drop assumption in parsePath (#348)
mlimbeck May 21, 2024
9dd6b9e
Use Gobra's built-in ghost fields (#337)
jcp19 May 25, 2024
57cdd3e
Fix ghostness of output params (#349)
jcp19 May 26, 2024
1c89916
fix fmt (#351)
jcp19 Jun 5, 2024
fe87c9e
big clean-up (#354)
jcp19 Jun 12, 2024
f4ed38a
Drop Assumption in SetInfoField (#350)
mlimbeck Jun 13, 2024
b10cb4c
small clean-up (#355)
jcp19 Jun 13, 2024
89fd7b6
Simplification of segLens (#356)
mlimbeck Jun 14, 2024
aa0a472
make Len impure and add LenSpec (#357)
jcp19 Jun 14, 2024
c82183d
Format `info_hop_setter_lemmas.gobra` (#359)
jcp19 Jun 17, 2024
def1aad
Simplify validity criteria of paths (#352)
jcp19 Jun 17, 2024
1a4feed
proof of IsSupportedPkt (#363)
mlimbeck Jul 1, 2024
01387ec
Drop two assumptions and merge validity criteria `StronglyValid` and …
jcp19 Jul 11, 2024
2d69d42
Drop SetHopfield related assumptions (#368)
mlimbeck Jul 15, 2024
3a6f9f4
Drop IO-assumptions in processOHP (#369)
mlimbeck Jul 23, 2024
bb08a98
Merge branch 'master' into markus-epic
mlimbeck Jul 24, 2024
275e0eb
fix sytnax errors
mlimbeck Jul 24, 2024
befe79c
Merge branch 'master' into markus-epic
mlimbeck Jul 24, 2024
353786e
fix some verification errors
mlimbeck Jul 24, 2024
70bd6bd
make `hf_valid` opaque (#372)
jcp19 Jul 25, 2024
76b0661
Update README.md
jcp19 Jul 26, 2024
22bf818
progress with verification errors
mlimbeck Aug 12, 2024
1a2cb29
Merge branch 'master' into markus-epic
mlimbeck Aug 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 88 additions & 4 deletions .github/workflows/gobra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ env:
mceMode: 'od'
requireTriggers: '1'
useZ3API: '0'
viperBackend: 'SILICON'
disableNL: '0'
unsafeWildcardOptimization: '1'
overflow: '0'

jobs:
verify-deps:
Expand Down Expand Up @@ -60,7 +64,11 @@ jobs:
imageVersion: ${{ env.imageVersion }}
mceMode: ${{ env.mceMode }}
requireTriggers: ${{ env.requireTriggers }}
overflow: ${{ env.overflow }}
useZ3API: ${{ env.useZ3API }}
disableNL: ${{ env.disableNL }}
viperBackend: ${{ env.viperBackend }}
unsafeWildcardOptimization: ${{ env.unsafeWildcardOptimization }}
- name: Verify package 'pkg/addr'
uses: viperproject/gobra-action@main
with:
Expand All @@ -76,12 +84,16 @@ jobs:
imageVersion: ${{ env.imageVersion }}
mceMode: ${{ env.mceMode }}
requireTriggers: ${{ env.requireTriggers }}
overflow: ${{ env.overflow }}
useZ3API: ${{ env.useZ3API }}
disableNL: ${{ env.disableNL }}
viperBackend: ${{ env.viperBackend }}
unsafeWildcardOptimization: ${{ env.unsafeWildcardOptimization }}
- name: Verify package 'pkg/experimental/epic'
uses: viperproject/gobra-action@main
with:
packages: 'pkg/experimental/epic'
timeout: 5m
timeout: 7m
headerOnly: ${{ env.headerOnly }}
module: ${{ env.module }}
includePaths: ${{ env.includePaths }}
Expand All @@ -91,7 +103,11 @@ jobs:
imageVersion: ${{ env.imageVersion }}
mceMode: ${{ env.mceMode }}
requireTriggers: ${{ env.requireTriggers }}
overflow: ${{ env.overflow }}
useZ3API: ${{ env.useZ3API }}
disableNL: ${{ env.disableNL }}
viperBackend: ${{ env.viperBackend }}
unsafeWildcardOptimization: ${{ env.unsafeWildcardOptimization }}
- name: Verify package 'pkg/log'
uses: viperproject/gobra-action@main
with:
Expand All @@ -106,7 +122,11 @@ jobs:
imageVersion: ${{ env.imageVersion }}
mceMode: ${{ env.mceMode }}
requireTriggers: ${{ env.requireTriggers }}
overflow: ${{ env.overflow }}
useZ3API: ${{ env.useZ3API }}
disableNL: ${{ env.disableNL }}
viperBackend: ${{ env.viperBackend }}
unsafeWildcardOptimization: ${{ env.unsafeWildcardOptimization }}
- name: Verify package 'pkg/private/serrors'
uses: viperproject/gobra-action@main
with:
Expand All @@ -121,7 +141,11 @@ jobs:
imageVersion: ${{ env.imageVersion }}
mceMode: ${{ env.mceMode }}
requireTriggers: ${{ env.requireTriggers }}
overflow: ${{ env.overflow }}
useZ3API: ${{ env.useZ3API }}
disableNL: ${{ env.disableNL }}
viperBackend: ${{ env.viperBackend }}
unsafeWildcardOptimization: ${{ env.unsafeWildcardOptimization }}
- name: Verify package 'pkg/scrypto'
uses: viperproject/gobra-action@main
with:
Expand All @@ -136,7 +160,11 @@ jobs:
imageVersion: ${{ env.imageVersion }}
mceMode: ${{ env.mceMode }}
requireTriggers: ${{ env.requireTriggers }}
overflow: ${{ env.overflow }}
useZ3API: ${{ env.useZ3API }}
disableNL: ${{ env.disableNL }}
viperBackend: ${{ env.viperBackend }}
unsafeWildcardOptimization: ${{ env.unsafeWildcardOptimization }}
- name: Verify package 'pkg/slayers'
uses: viperproject/gobra-action@main
with:
Expand All @@ -151,7 +179,11 @@ jobs:
imageVersion: ${{ env.imageVersion }}
mceMode: ${{ env.mceMode }}
requireTriggers: ${{ env.requireTriggers }}
overflow: ${{ env.overflow }}
useZ3API: ${{ env.useZ3API }}
disableNL: ${{ env.disableNL }}
viperBackend: ${{ env.viperBackend }}
unsafeWildcardOptimization: ${{ env.unsafeWildcardOptimization }}
- name: Verify package 'pkg/slayers/path'
uses: viperproject/gobra-action@main
with:
Expand All @@ -166,7 +198,11 @@ jobs:
imageVersion: ${{ env.imageVersion }}
mceMode: ${{ env.mceMode }}
requireTriggers: ${{ env.requireTriggers }}
overflow: ${{ env.overflow }}
useZ3API: ${{ env.useZ3API }}
disableNL: ${{ env.disableNL }}
viperBackend: ${{ env.viperBackend }}
unsafeWildcardOptimization: ${{ env.unsafeWildcardOptimization }}
- name: Verify package 'pkg/slayers/path/empty'
uses: viperproject/gobra-action@main
with:
Expand All @@ -181,7 +217,11 @@ jobs:
imageVersion: ${{ env.imageVersion }}
mceMode: ${{ env.mceMode }}
requireTriggers: ${{ env.requireTriggers }}
overflow: ${{ env.overflow }}
useZ3API: ${{ env.useZ3API }}
disableNL: ${{ env.disableNL }}
viperBackend: ${{ env.viperBackend }}
unsafeWildcardOptimization: ${{ env.unsafeWildcardOptimization }}
- name: Verify package 'pkg/slayers/path/epic'
uses: viperproject/gobra-action@main
with:
Expand All @@ -197,7 +237,11 @@ jobs:
imageVersion: ${{ env.imageVersion }}
mceMode: ${{ env.mceMode }}
requireTriggers: ${{ env.requireTriggers }}
overflow: ${{ env.overflow }}
useZ3API: ${{ env.useZ3API }}
disableNL: ${{ env.disableNL }}
viperBackend: ${{ env.viperBackend }}
unsafeWildcardOptimization: ${{ env.unsafeWildcardOptimization }}
- name: Verify package 'pkg/slayers/path/onehop'
uses: viperproject/gobra-action@main
with:
Expand All @@ -212,7 +256,11 @@ jobs:
imageVersion: ${{ env.imageVersion }}
mceMode: ${{ env.mceMode }}
requireTriggers: ${{ env.requireTriggers }}
overflow: ${{ env.overflow }}
useZ3API: ${{ env.useZ3API }}
disableNL: ${{ env.disableNL }}
viperBackend: ${{ env.viperBackend }}
unsafeWildcardOptimization: ${{ env.unsafeWildcardOptimization }}
- name: Verify package 'pkg/slayers/path/scion'
uses: viperproject/gobra-action@main
with:
Expand All @@ -227,7 +275,11 @@ jobs:
imageVersion: ${{ env.imageVersion }}
mceMode: ${{ env.mceMode }}
requireTriggers: ${{ env.requireTriggers }}
overflow: ${{ env.overflow }}
useZ3API: ${{ env.useZ3API }}
disableNL: ${{ env.disableNL }}
viperBackend: ${{ env.viperBackend }}
unsafeWildcardOptimization: ${{ env.unsafeWildcardOptimization }}
- name: Verify package 'private/topology'
uses: viperproject/gobra-action@main
with:
Expand All @@ -242,7 +294,11 @@ jobs:
imageVersion: ${{ env.imageVersion }}
mceMode: ${{ env.mceMode }}
requireTriggers: ${{ env.requireTriggers }}
overflow: ${{ env.overflow }}
useZ3API: ${{ env.useZ3API }}
disableNL: ${{ env.disableNL }}
viperBackend: ${{ env.viperBackend }}
unsafeWildcardOptimization: ${{ env.unsafeWildcardOptimization }}
- name: Verify package 'private/topology/underlay'
uses: viperproject/gobra-action@main
with:
Expand All @@ -257,7 +313,11 @@ jobs:
imageVersion: ${{ env.imageVersion }}
mceMode: ${{ env.mceMode }}
requireTriggers: ${{ env.requireTriggers }}
overflow: ${{ env.overflow }}
useZ3API: ${{ env.useZ3API }}
disableNL: ${{ env.disableNL }}
viperBackend: ${{ env.viperBackend }}
unsafeWildcardOptimization: ${{ env.unsafeWildcardOptimization }}
- name: Verify package 'private/underlay/conn'
uses: viperproject/gobra-action@main
with:
Expand All @@ -272,7 +332,11 @@ jobs:
imageVersion: ${{ env.imageVersion }}
mceMode: ${{ env.mceMode }}
requireTriggers: ${{ env.requireTriggers }}
overflow: ${{ env.overflow }}
useZ3API: ${{ env.useZ3API }}
disableNL: ${{ env.disableNL }}
viperBackend: ${{ env.viperBackend }}
unsafeWildcardOptimization: ${{ env.unsafeWildcardOptimization }}
- name: Verify package 'private/underlay/sockctrl'
uses: viperproject/gobra-action@main
with:
Expand All @@ -287,7 +351,11 @@ jobs:
imageVersion: ${{ env.imageVersion }}
mceMode: ${{ env.mceMode }}
requireTriggers: ${{ env.requireTriggers }}
overflow: ${{ env.overflow }}
useZ3API: ${{ env.useZ3API }}
disableNL: ${{ env.disableNL }}
viperBackend: ${{ env.viperBackend }}
unsafeWildcardOptimization: ${{ env.unsafeWildcardOptimization }}
- name: Verify package 'router/bfd'
uses: viperproject/gobra-action@main
with:
Expand All @@ -302,7 +370,11 @@ jobs:
imageVersion: ${{ env.imageVersion }}
mceMode: ${{ env.mceMode }}
requireTriggers: ${{ env.requireTriggers }}
overflow: ${{ env.overflow }}
useZ3API: ${{ env.useZ3API }}
disableNL: ${{ env.disableNL }}
viperBackend: ${{ env.viperBackend }}
unsafeWildcardOptimization: ${{ env.unsafeWildcardOptimization }}
- name: Verify package 'router/control'
uses: viperproject/gobra-action@main
with:
Expand All @@ -317,7 +389,11 @@ jobs:
imageVersion: ${{ env.imageVersion }}
mceMode: ${{ env.mceMode }}
requireTriggers: ${{ env.requireTriggers }}
overflow: ${{ env.overflow }}
useZ3API: ${{ env.useZ3API }}
disableNL: ${{ env.disableNL }}
viperBackend: ${{ env.viperBackend }}
unsafeWildcardOptimization: ${{ env.unsafeWildcardOptimization }}
- name: Upload the verification report
uses: actions/upload-artifact@v2
with:
Expand All @@ -339,12 +415,20 @@ jobs:
includePaths: ${{ env.includePaths }}
assumeInjectivityOnInhale: ${{ env.assumeInjectivityOnInhale }}
checkConsistency: ${{ env.checkConsistency }}
# Due to a bug introduced in https://github.com/viperproject/gobra/pull/776,
# we must currently disable the chopper, otherwise we well-founded orders
# for termination checking are not available at the chopped Viper parts.
# We should reenable it whenever possible, as it reduces verification time in
# ~8 min (20%).
# chop: 10
parallelizeBranches: '1'
# The following flag has a significant influence on the number of branches verified.
# Without it, verification would take a lot longer.
conditionalizePermissions: '1'
moreJoins: 'impure'
imageVersion: ${{ env.imageVersion }}
mceMode: 'on'
requireTriggers: ${{ env.requireTriggers }}
overflow: ${{ env.overflow }}
useZ3API: ${{ env.useZ3API }}

disableNL: '0'
viperBackend: ${{ env.viperBackend }}
unsafeWildcardOptimization: '0'
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# VerifiedSCION

This package contains the **verified** implementation of the
This package contains the **verified** implementation of the router from the
[SCION](http://www.scion-architecture.net) protocol, a future Internet architecture.
SCION is the first
clean-slate Internet architecture designed to provide route control, failure
Expand All @@ -10,7 +10,7 @@ isolation, and explicit trust information for end-to-end communication.

To find out more about the project, please visit the [official project page](https://www.pm.inf.ethz.ch/research/verifiedscion.html).

> We are currently in the process of migrating the specifications and other annotations from the [original VerifiedSCION repository](https://github.com/jcp19/VerifiedSCION) to this one. This repository contains an up-to-date version of SCION (which we plan to keep updated), as well as improvements resulting from our experience from our first efforts on verifying SCION.
> This repository contains a recent version of SCION (which we plan to keep updated), as well as fixes to the bugs we report as a result of verifying the SCION router from the mainline SCION repository.

## Methodology
We focus on verifying the main implementation of SCION, written in the *Go* programming language.
Expand Down
32 changes: 16 additions & 16 deletions pkg/addr/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (

"github.com/scionproto/scion/pkg/private/serrors"
//@ . "github.com/scionproto/scion/verification/utils/definitions"
//@ "github.com/scionproto/scion/verification/utils/slices"
//@ sl "github.com/scionproto/scion/verification/utils/slices"
)

type HostAddrType uint8
Expand Down Expand Up @@ -196,7 +196,7 @@ func (h HostIPv4) Pack() (res []byte) {
func (h HostIPv4) IP() (res net.IP) {
// XXX(kormat): ensure the reply is the 4-byte representation.
//@ unfold acc(h.Mem(), R13)
//@ unfold acc(slices.AbsSlice_Bytes(h, 0, len(h)), R13)
//@ unfold acc(sl.Bytes(h, 0, len(h)), R13)
return net.IP(h).To4( /*@ false @*/ )
}

Expand All @@ -205,10 +205,10 @@ func (h HostIPv4) IP() (res net.IP) {
// @ decreases
func (h HostIPv4) Copy() (res HostAddr) {
//@ unfold acc(h.Mem(), R13)
//@ unfold acc(slices.AbsSlice_Bytes(h, 0, len(h)), R13)
//@ unfold acc(sl.Bytes(h, 0, len(h)), R13)
var tmp HostIPv4 = HostIPv4(append( /*@ R13, @*/ net.IP(nil), h...))
//@ fold acc(slices.AbsSlice_Bytes(h, 0, len(h)), R13)
//@ fold slices.AbsSlice_Bytes(tmp, 0, len(tmp))
//@ fold acc(sl.Bytes(h, 0, len(h)), R13)
//@ fold sl.Bytes(tmp, 0, len(tmp))
//@ fold acc(h.Mem(), R13)
//@ fold tmp.Mem()
return tmp
Expand All @@ -231,7 +231,7 @@ func (h HostIPv4) Equal(o HostAddr) bool {
func (h HostIPv4) String() string {
//@ assert unfolding acc(h.Mem(), R13) in len(h) == HostLenIPv4
//@ ghost defer fold acc(h.Mem(), R13)
//@ ghost defer fold acc(slices.AbsSlice_Bytes(h, 0, len(h)), R13)
//@ ghost defer fold acc(sl.Bytes(h, 0, len(h)), R13)
return h.IP().String()
}

Expand All @@ -254,7 +254,7 @@ func (h HostIPv6) Type() HostAddrType {
// @ decreases
func (h HostIPv6) Pack() (res []byte) {
//@ unfold acc(h.Mem(), R13)
//@ unfold acc(slices.AbsSlice_Bytes(h, 0, len(h)), R13)
//@ unfold acc(sl.Bytes(h, 0, len(h)), R13)
return []byte(h)[:HostLenIPv6]
}

Expand All @@ -264,7 +264,7 @@ func (h HostIPv6) Pack() (res []byte) {
// @ decreases
func (h HostIPv6) IP() (res net.IP) {
//@ unfold acc(h.Mem(), R13)
//@ unfold acc(slices.AbsSlice_Bytes(h, 0, len(h)), R13)
//@ unfold acc(sl.Bytes(h, 0, len(h)), R13)
return net.IP(h)
}

Expand All @@ -273,10 +273,10 @@ func (h HostIPv6) IP() (res net.IP) {
// @ decreases
func (h HostIPv6) Copy() (res HostAddr) {
//@ unfold acc(h.Mem(), R13)
//@ unfold acc(slices.AbsSlice_Bytes(h, 0, len(h)), R13)
//@ unfold acc(sl.Bytes(h, 0, len(h)), R13)
var tmp HostIPv6 = HostIPv6(append( /*@ R13, @*/ net.IP(nil), h...))
//@ fold acc(slices.AbsSlice_Bytes(h, 0, len(h)), R13)
//@ fold slices.AbsSlice_Bytes(tmp, 0, len(tmp))
//@ fold acc(sl.Bytes(h, 0, len(h)), R13)
//@ fold sl.Bytes(tmp, 0, len(tmp))
//@ fold acc(h.Mem(), R13)
//@ fold tmp.Mem()
return tmp
Expand All @@ -299,7 +299,7 @@ func (h HostIPv6) Equal(o HostAddr) bool {
func (h HostIPv6) String() string {
//@ assert unfolding acc(h.Mem(), R13) in len(h) == HostLenIPv6
//@ ghost defer fold acc(h.Mem(), R13)
//@ ghost defer fold acc(slices.AbsSlice_Bytes(h, 0, len(h)), R13)
//@ ghost defer fold acc(sl.Bytes(h, 0, len(h)), R13)
return h.IP().String()
}

Expand Down Expand Up @@ -442,7 +442,7 @@ func HostFromRaw(b []byte, htype HostAddrType) (res HostAddr, err error) {
}
//@ assert forall i int :: { &b[:HostLenIPv4][i] } 0 <= i && i < len(b[:HostLenIPv4]) ==> &b[:HostLenIPv4][i] == &b[i]
tmp := HostIPv4(b[:HostLenIPv4])
//@ fold slices.AbsSlice_Bytes(tmp, 0, len(tmp))
//@ fold sl.Bytes(tmp, 0, len(tmp))
//@ fold tmp.Mem()
return tmp, nil
case HostTypeIPv6:
Expand All @@ -451,7 +451,7 @@ func HostFromRaw(b []byte, htype HostAddrType) (res HostAddr, err error) {
}
//@ assert forall i int :: { &b[:HostLenIPv4][i] } 0 <= i && i < len(b[:HostLenIPv4]) ==> &b[:HostLenIPv4][i] == &b[i]
tmp := HostIPv6(b[:HostLenIPv6])
//@ fold slices.AbsSlice_Bytes(tmp, 0, len(tmp))
//@ fold sl.Bytes(tmp, 0, len(tmp))
//@ fold tmp.Mem()
return tmp, nil
case HostTypeSVC:
Expand All @@ -473,12 +473,12 @@ func HostFromRaw(b []byte, htype HostAddrType) (res HostAddr, err error) {
func HostFromIP(ip net.IP) (res HostAddr) {
if ip4 := ip.To4( /*@ false @*/ ); ip4 != nil {
tmp := HostIPv4(ip4)
//@ fold slices.AbsSlice_Bytes(tmp, 0, len(tmp))
//@ fold sl.Bytes(tmp, 0, len(tmp))
//@ fold tmp.Mem()
return tmp
}
tmp := HostIPv6(ip)
//@ fold slices.AbsSlice_Bytes(tmp, 0, len(tmp))
//@ fold sl.Bytes(tmp, 0, len(tmp))
//@ fold tmp.Mem()
return tmp
}
Expand Down
Loading
Loading