Skip pseudo interfaces
authorRoy Marples <roy@marples.name>
Fri, 18 Jul 2014 07:49:42 +0000 (07:49 +0000)
committerRoy Marples <roy@marples.name>
Fri, 18 Jul 2014 07:49:42 +0000 (07:49 +0000)
src/libdhcpcd/dhcpcd.c

index 3876d0ff7e54cb8948a052f14631cd2fe96588eb..3c971d45ce7f2635ced6f200a9a32b3e52dd0386 100644 (file)
@@ -292,7 +292,7 @@ dhcpcd_get_if(DHCPCD_CONNECTION *con, const char *ifname, const char *type)
 static DHCPCD_IF *
 dhcpcd_new_if(DHCPCD_CONNECTION *con, char *data, size_t len)
 {
-       const char *ifname, *reason, *type, *order, *flags;
+       const char *ifname, *ifclass, *reason, *type, *order, *flags;
        char *orderdup, *o, *p;
        DHCPCD_IF *e, *i, *l, *n, *nl;
        int ti;
@@ -307,6 +307,12 @@ dhcpcd_new_if(DHCPCD_CONNECTION *con, char *data, size_t len)
                errno = ESRCH;
                return NULL;
        }
+       ifclass = get_value(data, len, "ifclass=");
+       /* Skip pseudo interfaces */
+       if (ifclass && *ifclass != '\0') {
+               errno = ENOTSUP;
+               return NULL;
+       }
        if (strcmp(reason, "RECONFIGURE") == 0) {
                errno = ENOTSUP;
                return NULL;