diff options
| author | Roy Marples <roy@marples.name> | 2019-10-14 16:01:00 +0100 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2019-10-14 16:01:00 +0100 |
| commit | 8419bbd5b6e3709854d2cff977729f28ed84bf4a (patch) | |
| tree | 0d299e256b8265672a6256396926efc3c7a0ed1e /src/ipv6.c | |
| parent | ca87fad681e3822933b3facc7d5c10138b05e35d (diff) | |
| download | dhcpcd-8419bbd5b6e3709854d2cff977729f28ed84bf4a.tar.xz | |
inet6: Fix a potential crash learning addresses
Interface maybe active but without options.
In this case, check the global state of IPv6.
Diffstat (limited to 'src/ipv6.c')
| -rw-r--r-- | src/ipv6.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1253,7 +1253,9 @@ out: * or DHCP6 handlers and the existance of any useable * global address on the interface has changed, * call rt_build to add/remove the default route. */ - if (ifp->active && ifp->options->options & DHCPCD_IPV6 && + if (ifp->active && + ((ifp->options != NULL && ifp->options->options & DHCPCD_IPV6) || + (ifp->options == NULL && ctx->options & DHCPCD_IPV6)) && !(ctx->options & DHCPCD_RTBUILD) && (ipv6_anyglobal(ifp) != NULL) != anyglobal) rt_build(ctx, AF_INET6); |
