diff options
author | Boris Zervu <zervu1boris@gmail.com> | 2024-09-01 02:22:59 +0300 |
---|---|---|
committer | Boris Zervu <zervu1boris@gmail.com> | 2024-09-01 02:22:59 +0300 |
commit | f457628041ca77a37afd791c0f6d7330fca1e540 (patch) | |
tree | 43bbdfc142282f297cf638e624c2af1438fd7300 /accel-pppd | |
parent | 2d38a77c008524e293e0dc4b1e46c9093e7a9457 (diff) | |
download | accel-ppp-f457628041ca77a37afd791c0f6d7330fca1e540.tar.gz accel-ppp-f457628041ca77a37afd791c0f6d7330fca1e540.zip |
pppd_compat: add Framed-Interface-Id attribute support in radattr
Diffstat (limited to 'accel-pppd')
-rw-r--r-- | accel-pppd/extra/pppd_compat.c | 8 |
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); |