]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
hooks: set protocol to link for link layer events
authorRoy Marples <roy@marples.name>
Tue, 12 Dec 2017 14:32:48 +0000 (14:32 +0000)
committerRoy Marples <roy@marples.name>
Tue, 12 Dec 2017 14:32:48 +0000 (14:32 +0000)
src/script.c

index 8efd5f6c8f8b1701509e9b25e2f61a02513ad2ea..2237b00d37b884d5d5beafc26cfc5c5b7236c01c 100644 (file)
@@ -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)