]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
IPv4LL: A state might not always exist when running the script.
authorChristos Zoulas <christos@netbsd.org>
Mon, 27 Jan 2020 12:56:04 +0000 (12:56 +0000)
committerRoy Marples <roy@marples.name>
Mon, 27 Jan 2020 12:57:34 +0000 (12:57 +0000)
For example, we deleted existing IPv4LL addresses that dhcpcd
doesn't directly control when we obtained a DHCP lease.

src/script.c

index 4d0ba447cfdcd2b8c9c68d9491071dad34820d46..3fdb1f6bf68dbd8736d4615fc111f6a13fe68e14 100644 (file)
@@ -453,7 +453,7 @@ make_env(const struct interface *ifp, const char *reason)
 dumplease:
 #ifdef INET
 #ifdef IPV4LL
-       if (protocol == PROTO_IPV4LL) {
+       if (protocol == PROTO_IPV4LL && istate) {
                if (ipv4ll_env(fp, istate->down ? "old" : "new", ifp) == -1)
                        goto eexit;
        }