diff options
| author | Renato Westphal <renatowestphal@gmail.com> | 2017-05-12 15:38:18 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-05-13 13:08:00 -0400 |
| commit | 76220653492a3eb9eadc3d1d78a1a4bfbc1b5ece (patch) | |
| tree | 98ace6add23a1ec1503aa2612f65db575c60e973 /eigrpd/eigrp_zebra.c | |
| parent | dfdbe7e4b0340c46cd8338e7e44e6bfa5f52e933 (diff) | |
eigrpd: Some Basic Corrections
* Advertise routes to zebra
* Connected routes should not have a nexthop address
* Fix segfaut on exit
Signed-off-by: Renato Westphal <renatowestphal@gmail.com>
Diffstat (limited to 'eigrpd/eigrp_zebra.c')
| -rw-r--r-- | eigrpd/eigrp_zebra.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/eigrpd/eigrp_zebra.c b/eigrpd/eigrp_zebra.c index 627d564a78..befb39dba1 100644 --- a/eigrpd/eigrp_zebra.c +++ b/eigrpd/eigrp_zebra.c @@ -444,8 +444,13 @@ eigrp_zebra_route_add (struct prefix_ipv4 *p, struct list *successors) /* Nexthop, ifindex, distance and metric information. */ for (ALL_LIST_ELEMENTS_RO (successors, node, te)) { - stream_putc (s, NEXTHOP_TYPE_IPV4_IFINDEX); - stream_put_in_addr (s, &te->adv_router->src); + if (te->adv_router->src.s_addr) + { + stream_putc (s, NEXTHOP_TYPE_IPV4_IFINDEX); + stream_put_in_addr (s, &te->adv_router->src); + } + else + stream_putc (s, NEXTHOP_TYPE_IFINDEX); stream_putl (s, te->ei->ifp->ifindex); } |
