IPv6: fix device_prefix vlist_key to not include prefix class
authorSteven Barth <steven@midlink.org>
Fri, 31 May 2013 15:05:58 +0000 (17:05 +0200)
committerSteven Barth <steven@midlink.org>
Fri, 31 May 2013 15:05:58 +0000 (17:05 +0200)
interface-ip.c

index 15a91afdb0e69aded2bd8bf284ba5da5a4ee3e15..165d4a8d52c8f4fa939efc5f3b54002029f08e5a 100644 (file)
@@ -370,7 +370,7 @@ route_cmp(const void *k1, const void *k2, void *ptr)
 static int
 prefix_cmp(const void *k1, const void *k2, void *ptr)
 {
-       return memcmp(k1, k2, sizeof(struct device_prefix) -
+       return memcmp(k1, k2, offsetof(struct device_prefix, pclass) -
                        offsetof(struct device_prefix, addr));
 }