diff options
author | DmitriyEshenko <dmitriy.eshenko@vyos.io> | 2022-01-03 16:06:07 +0300 |
---|---|---|
committer | DmitriyEshenko <dmitriy.eshenko@vyos.io> | 2022-01-13 10:52:35 +0300 |
commit | f756c265e991db26806787b12f8e2d8f96e8d47d (patch) | |
tree | b31c00e1a7c5211c4162ef88eabf5832b53bd9a4 /accel-pppd | |
parent | cca47ac174d1f2a99ee4969423e2bbc4b2fb6af8 (diff) | |
download | accel-ppp-f756c265e991db26806787b12f8e2d8f96e8d47d.tar.gz accel-ppp-f756c265e991db26806787b12f8e2d8f96e8d47d.zip |
Check if ipv6 dp availible before answer
Diffstat (limited to 'accel-pppd')
-rw-r--r-- | accel-pppd/extra/ipv6pool.c | 3 | ||||
-rw-r--r-- | accel-pppd/ipv6/dhcpv6.c | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/accel-pppd/extra/ipv6pool.c b/accel-pppd/extra/ipv6pool.c index 3494a91..c5cabef 100644 --- a/accel-pppd/extra/ipv6pool.c +++ b/accel-pppd/extra/ipv6pool.c @@ -307,6 +307,9 @@ static struct ipv6db_prefix_t *get_dp(struct ap_session *ses) else pool = def_dppool; + if (!pool) + return NULL; + start = pool; do { spin_lock(&pool->lock); diff --git a/accel-pppd/ipv6/dhcpv6.c b/accel-pppd/ipv6/dhcpv6.c index cc7f1f3..91b396c 100644 --- a/accel-pppd/ipv6/dhcpv6.c +++ b/accel-pppd/ipv6/dhcpv6.c @@ -352,6 +352,10 @@ static void dhcpv6_send_reply(struct dhcpv6_packet *req, struct dhcpv6_pd *pd, i ses->ipv6_dp = ipdb_get_ipv6_prefix(ses); if (ses->ipv6_dp) triton_event_fire(EV_FORCE_INTERIM_UPDATE, ses); + else { + dhcpv6_packet_free(reply); + return; + } } if ((req->hdr->type == D6_RENEW) && pd->dp_iaid != ia_na->iaid) { |