]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix CID: 1153964 and 1153966
authorRoy Marples <roy@marples.name>
Tue, 14 Jan 2014 10:56:21 +0000 (10:56 +0000)
committerRoy Marples <roy@marples.name>
Tue, 14 Jan 2014 10:56:21 +0000 (10:56 +0000)
dhcp6.c
if-options.c

diff --git a/dhcp6.c b/dhcp6.c
index 46248eb8c84d8125dc16f76f7dd5758440594f9e..c86cf2772b5da8f5db71f507fcfa6be485455fea 100644 (file)
--- a/dhcp6.c
+++ b/dhcp6.c
@@ -431,6 +431,10 @@ dhcp6_makemessage(struct interface *ifp)
                        ml = state->new_len;
                }
                si = dhcp6_getmoption(D6_OPTION_SERVERID, m, ml);
+               if (si == NULL) {
+                       errno = ESRCH;
+                       return -1;
+               }
                len += sizeof(*si) + ntohs(si->len);
                /* FALLTHROUGH */
        case DH6S_REBIND:
index 770245e5eb820b9b073a4dac0c54b841a2e39505..fc35f7632f283b151237c2b7afd9e32204afaaf4 100644 (file)
@@ -1083,6 +1083,7 @@ parse_option(struct if_options *ifo, int opt, const char *arg)
                if (parse_iaid(ifo->iaid, arg, sizeof(ifo->iaid)) == -1)
                        return -1;
                ifo->options |= DHCPCD_IAID;
+               break;
        case O_IPV6RS:
                ifo->options |= DHCPCD_IPV6RS;
                break;