Skip to content

Commit 9c9e4d9

Browse files
route: isMask is not necessary here
The strategy here is to use mask when available otherwise if it is a netmask address it will try to fallback on af.
1 parent e66491a commit 9c9e4d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
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) || isInet(int(b[1]))) {
423+
if isInet(int(b[1])) {
424424
af = int(b[1])
425425
}
426426
a, err := parseInetAddr(af, b)

0 commit comments

Comments
 (0)