diff options
author | Kozlov Dmitry <xeb@mail.ru> | 2011-08-30 18:15:22 +0400 |
---|---|---|
committer | Kozlov Dmitry <xeb@mail.ru> | 2011-08-30 18:15:22 +0400 |
commit | b7bd5d692e7113465a72aff79eea77ccdea72edf (patch) | |
tree | 599e5e3a592c9a6511fdebef18740f90c3afbf27 | |
parent | b8bcff4866bb5a4c18af7bbf6297eb7bed324544 (diff) | |
download | accel-ppp-b7bd5d692e7113465a72aff79eea77ccdea72edf.tar.gz accel-ppp-b7bd5d692e7113465a72aff79eea77ccdea72edf.zip |
dhcpv6: ignore ::/0 addresses/prefixes in IA_NA/IA_PD
-rw-r--r-- | accel-pppd/ipv6/dhcpv6.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/accel-pppd/ipv6/dhcpv6.c b/accel-pppd/ipv6/dhcpv6.c index 8e994af..cf09b07 100644 --- a/accel-pppd/ipv6/dhcpv6.c +++ b/accel-pppd/ipv6/dhcpv6.c @@ -268,6 +268,9 @@ static void dhcpv6_send_reply(struct dhcpv6_packet *req, struct dhcpv6_pd *pd, i if (ntohs(opt2->hdr->code) == D6_OPTION_IAADDR) { ia_addr = (struct dhcpv6_opt_ia_addr *)opt2->hdr; + if (IN6_IS_ADDR_UNSPECIFIED(&ia_addr->addr)) + continue; + f1 = 0; list_for_each_entry(a, &req->ppp->ipv6->addr_list, entry) { build_addr(a, req->ppp->ipv6->peer_intf_id, &addr); @@ -333,6 +336,9 @@ static void dhcpv6_send_reply(struct dhcpv6_packet *req, struct dhcpv6_pd *pd, i if (ntohs(opt2->hdr->code) == D6_OPTION_IAPREFIX) { ia_prefix = (struct dhcpv6_opt_ia_prefix *)opt2->hdr; + if (ia_prefix->prefix_len == 0 || IN6_IS_ADDR_UNSPECIFIED(&ia_prefix->prefix)) + continue; + f1 = 0; list_for_each_entry(a, &pd->ipv6_dp->prefix_list, entry) { if (a->prefix_len != ia_prefix->prefix_len) |