]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Let packet filters name themselves to avoid confusion.
authorRoy Marples <roy@marples.name>
Fri, 16 Jan 2015 23:39:03 +0000 (23:39 +0000)
committerRoy Marples <roy@marples.name>
Fri, 16 Jan 2015 23:39:03 +0000 (23:39 +0000)
dhcp.c
if-bsd.c
if-linux.c
if.h

diff --git a/dhcp.c b/dhcp.c
index 8fdbc3574b92cdc9ef2c5613d8bbdf624bb9ce63..91a9ce9dc488c4382e92821a9b5080a523e9c21d 100644 (file)
--- a/dhcp.c
+++ b/dhcp.c
@@ -2877,8 +2877,7 @@ dhcp_open(struct interface *ifp)
                state->raw_fd = if_openrawsocket(ifp, ETHERTYPE_IP);
                if (state->raw_fd == -1) {
                        if (errno == ENOENT) {
-                               syslog(LOG_ERR,
-                                  "Packet Filter missing from kernel");
+                               syslog(LOG_ERR, "%s not found", if_pfname);
                                /* May as well disable IPv4 entirely at
                                 * this point as we really need it. */
                                ifp->options->options &= ~DHCPCD_IPV4;
index 40ca85cc31259c4e50d1efcc76523da5628777ac..baa4bd8089f02a7ca517b146484864c1dcbdbaa5 100644 (file)
--- a/if-bsd.c
+++ b/if-bsd.c
@@ -260,6 +260,8 @@ if_vimaster(const char *ifname)
 }
 
 #ifdef INET
+const char *if_pfname = "Berkley Packet Filter";
+
 int
 if_openrawsocket(struct interface *ifp, int protocol)
 {
index 590f241a6fd4d806c197e829e0a9383009604eaa..69f5432e7ec68346c688ac1278e3450a81c3f8c1 100644 (file)
@@ -1062,6 +1062,8 @@ struct nlmr
 };
 
 #ifdef INET
+const char *if_pfname = "Packet Socket";
+
 int
 if_openrawsocket(struct interface *ifp, int protocol)
 {
diff --git a/if.h b/if.h
index 161654ac95e18fdb670a4b8acb004512dd5f3d80..98a07586dfa1b7007b4447f126f4879653bf2ca8 100644 (file)
--- a/if.h
+++ b/if.h
@@ -103,6 +103,7 @@ int if_openlinksocket(void);
 int if_managelink(struct dhcpcd_ctx *);
 
 #ifdef INET
+extern const char *if_pfname;
 int if_openrawsocket(struct interface *, int);
 ssize_t if_sendrawpacket(const struct interface *,
     int, const void *, size_t);