diff options
author | Brett Ciphery <brett.ciphery@windriver.com> | 2013-10-03 13:48:54 +0000 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2014-04-01 17:27:53 +0200 |
commit | db19c85679b08668c3dce73a655c21753042cf06 (patch) | |
tree | d36e66a2a34265b9a31bd93ed6bf00d7973b1232 /zebra | |
parent | 98a59492d9152df8c93612d2d12f170b5c034189 (diff) | |
download | quagga-db19c85679b08668c3dce73a655c21753042cf06.tar.bz2 quagga-db19c85679b08668c3dce73a655c21753042cf06.tar.xz |
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>
Diffstat (limited to 'zebra')
-rw-r--r-- | zebra/rt_netlink.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 7a820bfd..ba0b0d7d 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -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); |