diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2017-08-21 16:04:37 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2017-08-21 16:04:37 +0300 |
commit | b363f179b4cb6de2d3562a992bdb21adeac07639 (patch) | |
tree | 7eb158887eeccd13bdb2c428bc3198957ed90f4b /accel-pppd/ipv6 | |
parent | f945565500c51bb24daf9823c0a2f98747e93c3d (diff) | |
download | accel-ppp-b363f179b4cb6de2d3562a992bdb21adeac07639.tar.gz accel-ppp-b363f179b4cb6de2d3562a992bdb21adeac07639.zip |
dhcpv6: check if prefix_len equals 0, if so do not start dhcpv6 for this sessions
Diffstat (limited to 'accel-pppd/ipv6')
-rw-r--r-- | accel-pppd/ipv6/dhcpv6.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/accel-pppd/ipv6/dhcpv6.c b/accel-pppd/ipv6/dhcpv6.c index f147a8c..9c31507 100644 --- a/accel-pppd/ipv6/dhcpv6.c +++ b/accel-pppd/ipv6/dhcpv6.c @@ -60,12 +60,17 @@ static void ev_ses_started(struct ap_session *ses) struct ipv6_mreq mreq; struct dhcpv6_pd *pd; struct sockaddr_in6 addr; + struct ipv6db_addr_t *a; int sock; int f = 1; if (!ses->ipv6) return; + a = list_entry(ses->ipv6->addr_list.next, typeof(*a), entry); + if (a->prefix_len == 0) + return; + sock = net->socket(AF_INET6, SOCK_DGRAM, 0); if (!sock) { log_ppp_error("dhcpv6: socket: %s\n", strerror(errno)); |