From: Roy Marples Date: Mon, 29 Jun 2015 13:09:57 +0000 (+0000) Subject: Set interface is up when running IPV4LL scripts. X-Git-Tag: v6.9.1~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e17b05e1cf5e9124bb69d83e29ed280749c9a2e9;p=thirdparty%2Fdhcpcd.git Set interface is up when running IPV4LL scripts. --- diff --git a/ipv4ll.h b/ipv4ll.h index b2072844..eeebb958 100644 --- a/ipv4ll.h +++ b/ipv4ll.h @@ -50,6 +50,9 @@ struct ipv4ll_state { ((struct ipv4ll_state *)(ifp)->if_data[IF_DATA_IPV4LL]) #define IPV4LL_CSTATE(ifp) \ ((const struct ipv4ll_state *)(ifp)->if_data[IF_DATA_IPV4LL]) +#define IPV4LL_STATE_RUNNING(ifp) \ + (IPV4LL_CSTATE((ifp)) && \ + IN_LINKLOCAL(ntohl(IPV4LL_CSTATE((ifp))->addr.s_addr))) struct rt* ipv4ll_subnet_route(const struct interface *); ssize_t ipv4ll_env(char **, const char *, const struct interface *); diff --git a/script.c b/script.c index d152fb99..9033e575 100644 --- a/script.c +++ b/script.c @@ -354,6 +354,7 @@ make_env(const struct interface *ifp, const char *reason, char ***argv) } else if (1 == 2 /* appease ifdefs */ #ifdef INET || (dhcp && state && state->new) + || (ipv4ll && IPV4LL_STATE_RUNNING(ifp)) #endif #ifdef INET6 || (dhcp6 && d6_state && d6_state->new)