Skip to content

Commit e66491a

Browse files
route: fix tests
1 parent 0ace28a commit e66491a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

route/address.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ func parseAddrs(attrs uint, fn func(int, []byte) (int, Addr, error), b []byte) (
420420
}
421421
b = b[l:]
422422
case isInet(int(b[1])) || (isMask(i) && isInet(af)):
423-
if !isMask(i){
423+
if (!isMask(i) || isInet(int(b[1]))) {
424424
af = int(b[1])
425425
}
426426
a, err := parseInetAddr(af, b)

route/example_darwin_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"golang.org/x/sys/unix"
1515
)
1616

17-
func ExampleParseRIB_RTMGet() {
17+
func ExampleParseRIB() {
1818
// This example demonstrates how to parse a response to RTM_GET request.
1919
fd, err := unix.Socket(unix.AF_ROUTE, unix.SOCK_RAW, unix.AF_UNSPEC)
2020
if err != nil {

0 commit comments

Comments
 (0)