]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Ensure iaid was previously set before testing equality.
authorRoy Marples <roy@marples.name>
Wed, 9 Jul 2014 04:40:53 +0000 (04:40 +0000)
committerRoy Marples <roy@marples.name>
Wed, 9 Jul 2014 04:40:53 +0000 (04:40 +0000)
if-options.c

index 7be4ea17b91baa826af295bd3017b2c328dfb9f9..6fa4b12b2eee8cc1e60a5fed6e8b19741918532a 100644 (file)
@@ -1253,7 +1253,8 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo,
                ia = NULL;
                for (sl = 0; sl < ifo->ia_len; sl++) {
                        if ((arg == NULL && !ifo->ia[sl].iaid_set) ||
-                           (ifo->ia[sl].iaid[0] == iaid[0] &&
+                           (ifo->ia[sl].iaid_set &&
+                           ifo->ia[sl].iaid[0] == iaid[0] &&
                            ifo->ia[sl].iaid[1] == iaid[1] &&
                            ifo->ia[sl].iaid[2] == iaid[2] &&
                            ifo->ia[sl].iaid[3] == iaid[3]))