summaryrefslogtreecommitdiff
path: root/ripngd
diff options
context:
space:
mode:
Diffstat (limited to 'ripngd')
-rw-r--r--ripngd/ripngd.c5
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)