]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Ensure we have an active interface (which we always will).
authorRoy Marples <roy@marples.name>
Sun, 14 Aug 2016 09:06:41 +0000 (09:06 +0000)
committerRoy Marples <roy@marples.name>
Sun, 14 Aug 2016 09:06:41 +0000 (09:06 +0000)
dhcp6.c

diff --git a/dhcp6.c b/dhcp6.c
index 27aac2910bad448344277aa292a5c1b79f2b372e..7b3935cc25347bba57b5377dda5d16c33e8189a5 100644 (file)
--- a/dhcp6.c
+++ b/dhcp6.c
@@ -3184,7 +3184,7 @@ dhcp6_open(struct dhcpcd_ctx *dctx)
                        if (ifp->active)
                                break;
                }
-               if ((ia = ipv6_linklocal(ifp)) != NULL) {
+               if (ifp != NULL && (ia = ipv6_linklocal(ifp)) != NULL) {
                        memcpy(&sa.sin6_addr, &ia->addr, sizeof(sa.sin6_addr));
                        sa.sin6_scope_id = ifp->index;
                }