]> 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:56:04 +0000 (12:56 +0000)
For example, we deleted existing IPv4LL addresses that dhcpcd
doesn't directly control when we obtained a DHCP lease.

src/script.c

index 6189a4c1c63fb80fa71d155a41391021e19476c3..68aadff749b58d6aadda1baf1f99f1509e954cf0 100644 (file)
@@ -465,7 +465,7 @@ make_env(struct dhcpcd_ctx *ctx, const struct interface *ifp,
 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;
        }