Skip to content

Commit 4d4ba14

Browse files
youngififaboch
authored andcommitted
fix logic bug caused by operator precedence
1 parent 1e68b27 commit 4d4ba14

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

route_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1157,7 +1157,7 @@ func (h *Handle) RouteListFiltered(family int, filter *Route, filterMask uint64)
11571157
continue
11581158
}
11591159
if msg.Table != unix.RT_TABLE_MAIN {
1160-
if filter == nil || filter != nil && filterMask&RT_FILTER_TABLE == 0 {
1160+
if filter == nil || filterMask&RT_FILTER_TABLE == 0 {
11611161
// Ignore non-main tables
11621162
continue
11631163
}

0 commit comments

Comments
 (0)