Skip to content

Commit

Permalink
fix: pass attributes when adding routes
Browse files Browse the repository at this point in the history
This PR fixes a bug where we removed adding attributes during the
RouteAdd call for rtnetlink. The way that code is implemented means that
if *any* attributes are passed, the defaults are ignored. But we were
expecting defaults to be there. No longer!

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
  • Loading branch information
rsmitty authored and talos-bot committed Feb 12, 2021
1 parent d99a016 commit 1111edf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/app/networkd/pkg/nic/nic.go
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,8 @@ func (n *NetworkInterface) configureInterface(method address.Addressing, link *n
}

attr := rtnetlink.RouteAttributes{
Dst: r.Destination.IP,
OutIface: uint32(method.Link().Index),
Priority: r.Metric,
}

Expand Down

0 comments on commit 1111edf

Please sign in to comment.