summaryrefslogtreecommitdiffstats
path: root/ripngd
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2019-01-04 14:55:15 +0100
committerRenato Westphal <renato@opensourcerouting.org>2019-01-18 19:15:41 +0100
commitbb5d09c90c277ed12aa41c84f8f9026b47694c60 (patch)
tree2ed0e20c25f7b0a53e0e43609b71e839e0b7d8cf /ripngd
parentMerge pull request #3625 from donaldsharp/clist_strlen (diff)
downloadfrr-bb5d09c90c277ed12aa41c84f8f9026b47694c60.tar.xz
frr-bb5d09c90c277ed12aa41c84f8f9026b47694c60.zip
ripd, ripngd: fix null pointer dereference in YANG RPCs
These RPCs should do nothing when RIP/RIPng aren't configured. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ripngd')
-rw-r--r--ripngd/ripng_northbound.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ripngd/ripng_northbound.c b/ripngd/ripng_northbound.c
index 7993714e8..69e207f44 100644
--- a/ripngd/ripng_northbound.c
+++ b/ripngd/ripng_northbound.c
@@ -785,6 +785,9 @@ static int clear_ripng_route_rpc(const char *xpath, const struct list *input,
struct list *list;
struct listnode *listnode;
+ if (!ripng)
+ return NB_OK;
+
/* Clear received RIPng routes */
for (rp = agg_route_top(ripng->table); rp; rp = agg_route_next(rp)) {
list = rp->info;