summaryrefslogtreecommitdiff
path: root/zebra/rt_netlink.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2015-09-16 05:30:23 -0700
committerDonald Sharp <sharpd@cumulusnetworks.com>2015-09-16 05:30:23 -0700
commit6878b9db997273aa1eab64d3717430e5027f771c (patch)
tree9c13ac7c1398eb3a5bd3f3cdc4e5188a390a8e87 /zebra/rt_netlink.c
parent0aabccc0a849346fe45838b293add0ef79a71b07 (diff)
Warn user in various max path edge cases
Ticket: CM-6680 Reviewed-by: CCR-3486 Testing: See bug In these situations: (A) user enters under bgp more 'maximum-paths' than zebra is compiled with warn the user that there is a problem (B) Zebra receives more maximum paths than what it can handle log the fact that this happened Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/rt_netlink.c')
-rw-r--r--zebra/rt_netlink.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index e0124dcb49..dfff7869aa 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -780,7 +780,6 @@ netlink_routing_table (struct sockaddr_nl *snl, struct nlmsghdr *h)
if (len < (int) sizeof (*rtnh) || rtnh->rtnh_len > len)
break;
- rib->nexthop_num++;
index = rtnh->rtnh_ifindex;
gate = 0;
if (rtnh->rtnh_len > sizeof (*rtnh))
@@ -806,6 +805,8 @@ netlink_routing_table (struct sockaddr_nl *snl, struct nlmsghdr *h)
rtnh = RTNH_NEXT(rtnh);
}
+ zserv_nexthop_num_warn(__func__, (const struct prefix *)&p,
+ rib->nexthop_num);
if (rib->nexthop_num == 0)
XFREE (MTYPE_RIB, rib);
else
@@ -983,7 +984,6 @@ netlink_route_change (struct sockaddr_nl *snl, struct nlmsghdr *h)
if (len < (int) sizeof (*rtnh) || rtnh->rtnh_len > len)
break;
- rib->nexthop_num++;
index = rtnh->rtnh_ifindex;
gate = 0;
if (rtnh->rtnh_len > sizeof (*rtnh))
@@ -1009,6 +1009,9 @@ netlink_route_change (struct sockaddr_nl *snl, struct nlmsghdr *h)
rtnh = RTNH_NEXT(rtnh);
}
+ zserv_nexthop_num_warn(__func__, (const struct prefix *)&p,
+ rib->nexthop_num);
+
if (rib->nexthop_num == 0)
XFREE (MTYPE_RIB, rib);
else