summaryrefslogtreecommitdiff
path: root/accel-pppd/ipv6
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2016-04-30 20:32:00 +0300
committerDmitry Kozlov <xeb@mail.ru>2016-04-30 20:32:00 +0300
commit249dde4bbade8da12f80e64acef8826a4af0b567 (patch)
tree1a15f902f4ed737ad7f2b5bd0c53496c00098d1c /accel-pppd/ipv6
parent6c82f3d0d0e52b506968f54fd058d1e2a51a855b (diff)
downloadaccel-ppp-249dde4bbade8da12f80e64acef8826a4af0b567.tar.gz
accel-ppp-249dde4bbade8da12f80e64acef8826a4af0b567.zip
radius: add Delegated-IPv6-Prefix to accounting packets
Diffstat (limited to 'accel-pppd/ipv6')
-rw-r--r--accel-pppd/ipv6/dhcpv6.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/accel-pppd/ipv6/dhcpv6.c b/accel-pppd/ipv6/dhcpv6.c
index 595b5974..e170ae21 100644
--- a/accel-pppd/ipv6/dhcpv6.c
+++ b/accel-pppd/ipv6/dhcpv6.c
@@ -363,8 +363,11 @@ static void dhcpv6_send_reply(struct dhcpv6_packet *req, struct dhcpv6_pd *pd, i
ia_na->T1 = conf_pref_lifetime == -1 ? -1 : htonl(conf_pref_lifetime / 2);
ia_na->T2 = conf_pref_lifetime == -1 ? -1 : htonl((conf_pref_lifetime * 4) / 5);
- if (!ses->ipv6_dp)
+ if (!ses->ipv6_dp) {
ses->ipv6_dp = ipdb_get_ipv6_prefix(ses);
+ if (ses->ipv6_dp)
+ triton_event_fire(EV_FORCE_INTERIM_UPDATE, ses);
+ }
if ((req->hdr->type == D6_RENEW) && pd->dp_iaid != ia_na->iaid) {
insert_status(reply, opt1, D6_STATUS_NoBinding);
@@ -539,8 +542,11 @@ static void dhcpv6_send_reply2(struct dhcpv6_packet *req, struct dhcpv6_pd *pd,
ia_na->T1 = conf_pref_lifetime == -1 ? -1 : htonl(conf_pref_lifetime / 2);
ia_na->T2 = conf_pref_lifetime == -1 ? -1 : htonl((conf_pref_lifetime * 4) / 5);
- if (!ses->ipv6_dp)
- ses->ipv6_dp = ipdb_get_ipv6_prefix(req->ses);
+ if (!ses->ipv6_dp) {
+ ses->ipv6_dp = ipdb_get_ipv6_prefix(ses);
+ if (ses->ipv6_dp)
+ triton_event_fire(EV_FORCE_INTERIM_UPDATE, ses);
+ }
if (!ses->ipv6_dp)
goto out;