From: Roy Marples Date: Tue, 12 Dec 2017 14:32:48 +0000 (+0000) Subject: hooks: set protocol to link for link layer events X-Git-Tag: v7.0.0~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4bddfe24c1cdd2df770e39eb59adbec6d45d0a67;p=thirdparty%2Fdhcpcd.git hooks: set protocol to link for link layer events --- diff --git a/src/script.c b/src/script.c index 8efd5f6c..2237b00d 100644 --- a/src/script.c +++ b/src/script.c @@ -218,14 +218,14 @@ arraytostr(const char *const *argv, char **s) return (ssize_t)len; } -#define PROTO_NONE 0 +#define PROTO_LINK 0 #define PROTO_DHCP 1 #define PROTO_IPV4LL 2 #define PROTO_RA 3 #define PROTO_DHCP6 4 #define PROTO_STATIC6 5 static const char *protocols[] = { - NULL, + "link", "dhcp", "ipv4ll", "ra", @@ -295,7 +295,7 @@ make_env(const struct interface *ifp, const char *reason, char ***argv) strcmp(reason, "UNKNOWN") == 0 || strcmp(reason, "DEPARTED") == 0 || strcmp(reason, "STOPPED") == 0) - protocol = PROTO_NONE; + protocol = PROTO_LINK; #ifdef INET #ifdef IPV4LL else if (strcmp(reason, "IPV4LL") == 0)