diff options
Diffstat (limited to 'ripngd')
| -rw-r--r-- | ripngd/ripngd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c index 840157516f..565e151c53 100644 --- a/ripngd/ripngd.c +++ b/ripngd/ripngd.c @@ -1516,9 +1516,10 @@ int ripng_write_rte(int num, struct stream *s, struct prefix_ipv6 *p, } /* Write routing table entry. */ - if (!nexthop) + if (!nexthop) { + assert(p); stream_write(s, (uint8_t *)&p->prefix, sizeof(struct in6_addr)); - else + } else stream_write(s, (uint8_t *)nexthop, sizeof(struct in6_addr)); stream_putw(s, tag); if (p) |
