diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-09-25 08:37:04 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-09-25 08:37:04 -0400 |
| commit | 25715c7e50a9fe62370694a5c0f74cc6026d0b75 (patch) | |
| tree | 4aa9718ede0c7fcffd95f30a01767433900f9d24 /lib/command_py.c | |
| parent | c84ed8700efc07d66d2ea7373dcc2d9e116f1003 (diff) | |
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>
Diffstat (limited to 'lib/command_py.c')
0 files changed, 0 insertions, 0 deletions
