Add support for STATIC6
authorRoy Marples <roy@marples.name>
Mon, 15 Feb 2016 21:20:34 +0000 (21:20 +0000)
committerRoy Marples <roy@marples.name>
Mon, 15 Feb 2016 21:20:34 +0000 (21:20 +0000)
src/libdhcpcd/dhcpcd.c
src/libdhcpcd/dhcpcd.h

index 502f5908d95c33a15441a592514a778b39ab784f..543f8820200b2c2bbcc5ba4ee23a7f50a4c45ba4 100644 (file)
@@ -696,6 +696,11 @@ dhcpcd_reason_to_statetype(const char *reason,
        case DHS_IPV4LL:
                *type = DHT_IPV4LL;
                return;
+       case DHS_STATIC:
+               if (isdhcp6) {
+                       *type = DHT_IPV6;
+                       return;
+               }
        }
 
        if (isdhcp6)
@@ -931,6 +936,7 @@ dhcpcd_dispatch(DHCPCD_CONNECTION *con)
 
        assert(con);
        i = dhcpcd_read_if(con, con->listen_fd);
+
        if (i)
                dhcpcd_dispatchif(i);
 
@@ -1294,6 +1300,8 @@ dhcpcd_if_message(DHCPCD_IF *i, bool *new_msg)
        else if ((ip = dhcpcd_get_prefix_value(i, pfx,
            "delegated_dhcp6_prefix")))
                iplen = NULL;
+       else if ((ip = dhcpcd_get_prefix_value(i, pfx, "ip6_address")))
+               iplen = NULL;
        else {
                ip = NULL;
                iplen = NULL;
index f5ac46a454553c6e2a5d4a9429cd43654ad01ea9..cc7e989c759cbb87693932ad1c5025875abaaeb8 100644 (file)
@@ -83,9 +83,10 @@ extern const char * const dhcpcd_cstates[];
 #define DHT_DHCP                2
 #define DHT_IPV4                2
 #define DHT_IPV4LL              3
-#define DHT_RA                  4
-#define DHT_DHCP6               5
-#define DHT_MAX                         6
+#define DHT_IPV6                4
+#define DHT_RA                  5
+#define DHT_DHCP6               6
+#define DHT_MAX                         7
 
 #define DHS_UNKNOWN             0
 #define DHS_DUMP                1