Skip to content

Commit

Permalink
Merge pull request #1964 from maltelehmann/master
Browse files Browse the repository at this point in the history
wireguard backend: avoid error message if route already exists
  • Loading branch information
thomasferrandiz authored May 23, 2024
2 parents 55701f4 + 216d4ac commit bf59847
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/backend/wireguard/device.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ func (dev *wgDevice) addRoute(dst *net.IPNet) error {
Dst: dst,
}

err := netlink.RouteAdd(&route)
err := netlink.RouteReplace(&route)
if err != nil {
return fmt.Errorf("failed to add route %s: %w", dev.attrs.name, err)
}
Expand Down

0 comments on commit bf59847

Please sign in to comment.