summaryrefslogtreecommitdiffstats
path: root/lib/zclient.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2015-11-02 16:50:07 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2015-12-08 14:12:10 -0500
commitb11f3b54c842117e22e2f5cf1561ea34eee8dfcc (patch)
treec31f9893baa2a05db24ea72d1370fb6b11f59c20 /lib/zclient.c
parent7eb6136b2732d4782360f9f376336c6d4f667ff0 (diff)
downloadquagga-b11f3b54c842117e22e2f5cf1561ea34eee8dfcc.tar.bz2
quagga-b11f3b54c842117e22e2f5cf1561ea34eee8dfcc.tar.xz
zebra: implement per-route mtu handling
This commits allow overriding MTU using netlink attributes on per-route basis. This is useful for routing protocols that can advertice prefix specific MTUs between routers (e.g. NHRP). Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Diffstat (limited to 'lib/zclient.c')
-rw-r--r--lib/zclient.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/zclient.c b/lib/zclient.c
index bfff9a36..ca6a4c75 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -562,6 +562,8 @@ zapi_ipv4_route (u_char cmd, struct zclient *zclient, struct prefix_ipv4 *p,
stream_putc (s, api->distance);
if (CHECK_FLAG (api->message, ZAPI_MESSAGE_METRIC))
stream_putl (s, api->metric);
+ if (CHECK_FLAG (api->message, ZAPI_MESSAGE_MTU))
+ stream_putl (s, api->mtu);
/* Put length at the first point of the stream. */
stream_putw_at (s, 0, stream_get_endp (s));
@@ -616,6 +618,8 @@ zapi_ipv6_route (u_char cmd, struct zclient *zclient, struct prefix_ipv6 *p,
stream_putc (s, api->distance);
if (CHECK_FLAG (api->message, ZAPI_MESSAGE_METRIC))
stream_putl (s, api->metric);
+ if (CHECK_FLAG (api->message, ZAPI_MESSAGE_MTU))
+ stream_putl (s, api->mtu);
/* Put length at the first point of the stream. */
stream_putw_at (s, 0, stream_get_endp (s));