Update class assignment logic
authorSteven Barth <steven@midlink.org>
Wed, 4 Dec 2013 12:56:37 +0000 (13:56 +0100)
committerSteven Barth <steven@midlink.org>
Wed, 4 Dec 2013 12:56:37 +0000 (13:56 +0100)
src/dhcpv6-ia.c

index a9900011fbe0a37c278aaff7c7ec581be3e5628c..3defa84aa880eb6b2dde802fa59de60efe3e4d27 100644 (file)
@@ -882,6 +882,10 @@ size_t dhcpv6_handle_ia(uint8_t *buf, size_t buflen, struct interface *iface,
                                a->peer = *addr;
                                a->reconf_cnt = 0;
                                a->reconf_sent = 0;
+                               a->all_class = class_oro;
+                               a->classes_cnt = classes_cnt;
+                               a->classes = realloc(a->classes, classes_cnt * sizeof(uint16_t));
+                               memcpy(a->classes, classes, classes_cnt * sizeof(uint16_t));
                                break;
                        }
                }