summaryrefslogtreecommitdiff
path: root/accel-pppd/ipv6
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2017-08-21 16:04:37 +0300
committerDmitry Kozlov <xeb@mail.ru>2017-08-21 16:04:37 +0300
commitb363f179b4cb6de2d3562a992bdb21adeac07639 (patch)
tree7eb158887eeccd13bdb2c428bc3198957ed90f4b /accel-pppd/ipv6
parentf945565500c51bb24daf9823c0a2f98747e93c3d (diff)
downloadaccel-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.c5
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));