diff options
| author | Roy Marples <roy@marples.name> | 2020-02-09 18:54:29 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-02-09 18:54:29 +0000 |
| commit | bbba9864563cc6fa1c43e02aee9634f83a47221c (patch) | |
| tree | 2cb66b1070a65f6134b5bc8892d325b93dad984b /src/ipv6.c | |
| parent | 670f0d8d727e8973e91a007ebf7843a5b84ea03b (diff) | |
| download | dhcpcd-bbba9864563cc6fa1c43e02aee9634f83a47221c.tar.xz | |
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.
Diffstat (limited to 'src/ipv6.c')
| -rw-r--r-- | src/ipv6.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2323,6 +2323,9 @@ inet6_raroutes(rb_tree_t *routes, struct dhcpcd_ctx *ctx) 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; |
