diff options
author | Vladislav Grishenko <themiron@mail.ru> | 2018-01-12 22:24:28 +0500 |
---|---|---|
committer | Vladislav Grishenko <themiron@mail.ru> | 2018-01-13 02:07:50 +0500 |
commit | 933595c17e2a665315a9742ccd2ddeea6dafb78f (patch) | |
tree | c8803e5818879b0aeaa8513ce3c53949d609b21e /accel-pppd/ifcfg.c | |
parent | 2bec9805e11d591fb638908f78d82e7f62463a51 (diff) | |
download | accel-ppp-933595c17e2a665315a9742ccd2ddeea6dafb78f.tar.gz accel-ppp-933595c17e2a665315a9742ccd2ddeea6dafb78f.zip |
ipv6: consolidate and fix interface-id address generation for non-/128
Diffstat (limited to 'accel-pppd/ifcfg.c')
-rw-r--r-- | accel-pppd/ifcfg.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/accel-pppd/ifcfg.c b/accel-pppd/ifcfg.c index 956ec6ee..0b318968 100644 --- a/accel-pppd/ifcfg.c +++ b/accel-pppd/ifcfg.c @@ -45,16 +45,6 @@ static void devconf(struct ap_session *ses, const char *attr, const char *val) close(fd); } -/*static void build_addr(struct ipv6db_addr_t *a, uint64_t intf_id, struct in6_addr *addr) -{ - memcpy(addr, &a->addr, sizeof(*addr)); - - if (a->prefix_len <= 64) - *(uint64_t *)(addr->s6_addr + 8) = intf_id; - else - *(uint64_t *)(addr->s6_addr + 8) |= intf_id & htobe64((1 << (128 - a->prefix_len)) - 1); -}*/ - void ap_session_ifup(struct ap_session *ses) { if (ses->ifname_rename) { @@ -170,7 +160,7 @@ void __export ap_session_accounting_started(struct ap_session *ses) list_for_each_entry(a, &ses->ipv6->addr_list, entry) { a->installed = 0; /*if (a->prefix_len < 128) { - build_addr(a, ses->ipv6->intf_id, &ifr6.ifr6_addr); + build_ip6_addr(a, ses->ipv6->intf_id, &ifr6.ifr6_addr); ifr6.ifr6_prefixlen = a->prefix_len; if (ioctl(sock6_fd, SIOCSIFADDR, &ifr6)) |