Skip to content

Commit

Permalink
fix logic bug caused by operator precedence
Browse files Browse the repository at this point in the history
  • Loading branch information
youngifif authored and aboch committed May 24, 2024
1 parent 1e68b27 commit 4d4ba14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion route_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 4d4ba14

Please sign in to comment.