]> git.proxmox.com Git - mirror_frr.git/commit - eigrpd/eigrp_zebra.c
*: fix segfault when sending more than MULTIPATH_NUM nexthops
authorRenato Westphal <renato@opensourcerouting.org>
Thu, 21 Sep 2017 12:49:31 +0000 (09:49 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Thu, 21 Sep 2017 14:21:09 +0000 (11:21 -0300)
commita74e593b3545374a9021f8264152dba42e08323a
treef4e3c701b0bbf97aa03d4cfc3bee2baddb639bad
parent484aafd43f82a08a8b95160fa983a4617d119f54
*: fix segfault when sending more than MULTIPATH_NUM nexthops

This is a fallout from PR #1022 (zapi consolidation). In the early days,
the client daemons would allocate enough memory to send all nexthops
to zebra.  Then zebra would add all nexthops to the RIB and respect
MULTIPATH_NUM only when installing the routes in the kernel. Now things
are different and the client daemons can send at most MULTIPATH_NUM
nexthops to zebra, and failure to respect that will result in a buffer
overflow. The MULTIPATH_NUM limit in the new zebra API is a small price
we pay to avoid allocating memory for each route sent to zebra.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
bgpd/bgp_zebra.c
bgpd/rfapi/vnc_zebra.c
eigrpd/eigrp_zebra.c
isisd/isis_zebra.c
lib/zclient.c
ospf6d/ospf6_zebra.c
ospfd/ospf_zebra.c
ripd/rip_zebra.c
ripngd/ripng_zebra.c