]> git.puffer.fish Git - matthieu/frr.git/commit
zebra: Modify metric read to be admin distance and metric
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 25 Sep 2017 12:37:04 +0000 (08:37 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 25 Sep 2017 12:37:04 +0000 (08:37 -0400)
commit25715c7e50a9fe62370694a5c0f74cc6026d0b75
tree4aa9718ede0c7fcffd95f30a01767433900f9d24
parentc84ed8700efc07d66d2ea7373dcc2d9e116f1003
zebra: Modify metric read to be admin distance and metric

For ZEBRA_ROUTE_KERNEL types:

The metric/priority of the route received from the kernel
is a 32 bit number.  We are going to interpret the high
order byte as the Admin Distance and the low order 3 bytes
as the metric.

This will allow us to do two things:
1) Allow the creation of kernel routes that can be
   overridden by zebra.
2) Allow the old behavior for 'most' kernel route types
   if a user enters 'ip route ...' v4 routes get a metric
   of 0 and v6 routes get a metric of 1024.  Both of these
   values will end up with a admin distance of 0, which
   will cause them to win for the purposes of zebra.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
zebra/rt_netlink.c