Skip to content

Commit

Permalink
Fix network route adding rule to filter table
Browse files Browse the repository at this point in the history
Set filterTable only for ipv4 table
  • Loading branch information
mlsmaycon committed Oct 29, 2023
1 parent e2eef4e commit c82ff57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/internal/routemanager/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func (c *clientNetwork) getBestRouteFromStatuses(routePeerStatuses map[string]ro
log.Warnf("the network %s has not been assigned a routing peer as no peers from the list %s are currently connected", c.network, peers)

} else if chosen != currID {
log.Infof("new chosen route is %s with peer %s with score %d", chosen, c.routes[chosen].Peer, chosenScore)
log.Infof("new chosen route is %s with peer %s with score %d for network %s", chosen, c.routes[chosen].Peer, chosenScore, c.network)
}

return chosen
Expand Down
3 changes: 2 additions & 1 deletion client/internal/routemanager/nftables_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ func (n *nftablesManager) RestoreOrCreateContainers() error {
}

for _, table := range tables {
if table.Name == "filter" {
if table.Name == "filter" && table.Family == nftables.TableFamilyIPv4 {
log.Debugf("nftables: found filter table for ipv4")
n.filterTable = table
continue
}
Expand Down

0 comments on commit c82ff57

Please sign in to comment.