提交 bff66de7 编写于 作者: D Dmitry Kozlov

ipv6: ignore "unspecified address" (::/128)

上级 427c0e03
......@@ -52,6 +52,7 @@ struct dhcpv6_pd {
};
static void *pd_key;
static struct in6_addr null_addr;
static int dhcpv6_read(struct triton_md_handler_t *h);
......@@ -68,7 +69,7 @@ static void ev_ses_started(struct ap_session *ses)
return;
a = list_entry(ses->ipv6->addr_list.next, typeof(*a), entry);
if (a->prefix_len == 0)
if (a->prefix_len == 0 || memcmp(a->addr.s6_addr, null_addr.s6_addr, sizeof(null_addr)) == 0)
return;
sock = net->socket(AF_INET6, SOCK_DGRAM, 0);
......
......@@ -90,6 +90,7 @@ struct ipv6_nd_handler_t
};
static void *pd_key;
static struct in6_addr null_addr;
#define BUF_SIZE 1024
static mempool_t buf_pool;
......@@ -382,7 +383,7 @@ static void ev_ses_started(struct ap_session *ses)
return;
list_for_each_entry(a, &ses->ipv6->addr_list, entry) {
if (a->prefix_len) {
if (a->prefix_len && memcmp(a->addr.s6_addr, null_addr.s6_addr, sizeof(null_addr))) {
ipv6_nd_start(ses);
break;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册