changeset 5059:bd0bfd64aa0e draft

inet6: guard getting RA routers if inet6 not initialised Now that we get inet6 routes even when only building inet routes we need to guard as the RA routers collection could be NULL.
author Roy Marples <roy@marples.name>
date Sun, 09 Feb 2020 18:54:29 +0000
parents 607d2d75b835
children 4539ffcdd656
files src/ipv6.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/ipv6.c	Sun Feb 09 16:57:27 2020 +0000
+++ b/src/ipv6.c	Sun Feb 09 18:54:29 2020 +0000
@@ -2323,6 +2323,9 @@
 	struct ra *rap;
 	const struct ipv6_addr *addr;
 
+	if (ctx->ra_routers == NULL)
+		return 0;
+
 	TAILQ_FOREACH(rap, ctx->ra_routers, next) {
 		if (rap->expired)
 			continue;