mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 21:47:15 +02:00
zebra: set metric for directly connected routes via netlink to 0
a value of 1 is hard coded for the metric field, much like the ifconfig utility it may have roots in. in order to be in line with the metric used in the linux kernel itself, we switch this to 0. Signed-off-by: Brett Ciphery <brett.ciphery@windriver.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
parent
98a59492d9
commit
db19c85679
|
@ -504,7 +504,7 @@ netlink_interface (struct sockaddr_nl *snl, struct nlmsghdr *h)
|
|||
set_ifindex(ifp, ifi->ifi_index);
|
||||
ifp->flags = ifi->ifi_flags & 0x0000fffff;
|
||||
ifp->mtu6 = ifp->mtu = *(uint32_t *) RTA_DATA (tb[IFLA_MTU]);
|
||||
ifp->metric = 1;
|
||||
ifp->metric = 0;
|
||||
|
||||
/* Hardware type and address. */
|
||||
ifp->hw_type = ifi->ifi_type;
|
||||
|
@ -1084,7 +1084,7 @@ netlink_link_change (struct sockaddr_nl *snl, struct nlmsghdr *h)
|
|||
set_ifindex(ifp, ifi->ifi_index);
|
||||
ifp->flags = ifi->ifi_flags & 0x0000fffff;
|
||||
ifp->mtu6 = ifp->mtu = *(int *) RTA_DATA (tb[IFLA_MTU]);
|
||||
ifp->metric = 1;
|
||||
ifp->metric = 0;
|
||||
|
||||
netlink_interface_update_hw_addr (tb, ifp);
|
||||
|
||||
|
@ -1096,7 +1096,7 @@ netlink_link_change (struct sockaddr_nl *snl, struct nlmsghdr *h)
|
|||
/* Interface status change. */
|
||||
set_ifindex(ifp, ifi->ifi_index);
|
||||
ifp->mtu6 = ifp->mtu = *(int *) RTA_DATA (tb[IFLA_MTU]);
|
||||
ifp->metric = 1;
|
||||
ifp->metric = 0;
|
||||
|
||||
netlink_interface_update_hw_addr (tb, ifp);
|
||||
|
||||
|
|
Loading…
Reference in a new issue