summaryrefslogtreecommitdiff
path: root/accel-pppd/ifcfg.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/ifcfg.c')
-rw-r--r--accel-pppd/ifcfg.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/accel-pppd/ifcfg.c b/accel-pppd/ifcfg.c
index 3aff9eb4..3190873d 100644
--- a/accel-pppd/ifcfg.c
+++ b/accel-pppd/ifcfg.c
@@ -13,6 +13,7 @@
#include "linux_ppp.h"
#include "triton.h"
+#include "iputils.h"
#include "events.h"
#include "ppp.h"
#include "ipdb.h"
@@ -150,14 +151,15 @@ void ap_session_ifup(struct ap_session *ses)
}
list_for_each_entry(a, &ses->ipv6->addr_list, entry) {
- if (a->prefix_len == 128)
- continue;
-
- build_addr(a, ses->ipv6->intf_id, &ifr6.ifr6_addr);
- ifr6.ifr6_prefixlen = a->prefix_len;
-
- if (ioctl(sock6_fd, SIOCSIFADDR, &ifr6))
- log_ppp_error("failed to add IPv6 address: %s\n", strerror(errno));
+ /*if (a->prefix_len < 128) {
+ build_addr(a, ses->ipv6->intf_id, &ifr6.ifr6_addr);
+ ifr6.ifr6_prefixlen = a->prefix_len;
+
+ if (ioctl(sock6_fd, SIOCSIFADDR, &ifr6))
+ log_ppp_error("failed to add IPv6 address: %s\n", strerror(errno));
+ } else*/
+ if (ip6route_add(ses->ifindex, &a->addr, a->prefix_len, 0))
+ log_ppp_error("failed to add IPv6 route: %s\n", strerror(errno));
}
}