mirror of
https://github.com/vishvananda/netlink
synced 2024-12-26 16:42:22 +00:00
fix logic bug caused by operator precedence
This commit is contained in:
parent
1e68b2710d
commit
4d4ba1473f
@ -1157,7 +1157,7 @@ func (h *Handle) RouteListFiltered(family int, filter *Route, filterMask uint64)
|
||||
continue
|
||||
}
|
||||
if msg.Table != unix.RT_TABLE_MAIN {
|
||||
if filter == nil || filter != nil && filterMask&RT_FILTER_TABLE == 0 {
|
||||
if filter == nil || filterMask&RT_FILTER_TABLE == 0 {
|
||||
// Ignore non-main tables
|
||||
continue
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user