summaryrefslogtreecommitdiff
path: root/accel-pppd/extra/pppd_compat.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/extra/pppd_compat.c')
-rw-r--r--accel-pppd/extra/pppd_compat.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/accel-pppd/extra/pppd_compat.c b/accel-pppd/extra/pppd_compat.c
index 040e7d90..12363cd4 100644
--- a/accel-pppd/extra/pppd_compat.c
+++ b/accel-pppd/extra/pppd_compat.c
@@ -518,6 +518,10 @@ static void write_radattr(struct pppd_compat_pd *pd, struct rad_packet_t *pack)
int fd, i;
in_addr_t addr;
char ip_str[50];
+ union {
+ uint64_t ifid;
+ uint16_t u16[4];
+ } ifid_u;
if (ses->state == AP_STATE_ACTIVE) {
sprintf(fname1, "%s.%s", conf_radattr_prefix, ses->ifname);
@@ -572,6 +576,10 @@ static void write_radattr(struct pppd_compat_pd *pd, struct rad_packet_t *pack)
inet_ntop(AF_INET6, &attr->val.ipv6addr, ip_str, sizeof(ip_str));
fprintf(f, "%s\n", ip_str);
break;
+ case ATTR_TYPE_IFID:
+ ifid_u.ifid = attr->val.ifid;
+ fprintf(f, "%x:%x:%x:%x\n", ntohs(ifid_u.u16[0]), ntohs(ifid_u.u16[1]), ntohs(ifid_u.u16[2]), ntohs(ifid_u.u16[3]));
+ break;
}
}
fclose(f);