zebra: implement NEXTHOP_FLAG_ONLINK
On Linux, the kernel will only allow for a route to be installed when
its gateway is directly attached according the kernel fib.
There are cases when this restriction by the kernel is too strong, in
those cases, we deploy the RTNH_F_ONLINK netlink flag.
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c
index e1da7df..45928e9 100644
--- a/zebra/zebra_vty.c
+++ b/zebra/zebra_vty.c
@@ -615,6 +615,9 @@
if (! CHECK_FLAG (nexthop->flags, NEXTHOP_FLAG_ACTIVE))
vty_out (vty, " inactive");
+ if (CHECK_FLAG (nexthop->flags, NEXTHOP_FLAG_ONLINK))
+ vty_out (vty, " onlink");
+
if (CHECK_FLAG (nexthop->flags, NEXTHOP_FLAG_RECURSIVE))
vty_out (vty, " (recursive)");
@@ -710,6 +713,9 @@
if (! CHECK_FLAG (nexthop->flags, NEXTHOP_FLAG_ACTIVE))
vty_out (vty, " inactive");
+ if (CHECK_FLAG (nexthop->flags, NEXTHOP_FLAG_ONLINK))
+ vty_out (vty, " onlink");
+
if (CHECK_FLAG (nexthop->flags, NEXTHOP_FLAG_RECURSIVE))
vty_out (vty, " (recursive)");
@@ -1600,6 +1606,9 @@
if (! CHECK_FLAG (nexthop->flags, NEXTHOP_FLAG_ACTIVE))
vty_out (vty, " inactive");
+ if (CHECK_FLAG (nexthop->flags, NEXTHOP_FLAG_ONLINK))
+ vty_out (vty, " onlink");
+
if (CHECK_FLAG (nexthop->flags, NEXTHOP_FLAG_RECURSIVE))
vty_out (vty, " (recursive)");