From 30397cca6a4472f3087d1071ecc43438e39f705f Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Mon, 26 May 2014 10:55:57 +0400 Subject: ipoe: introduced "ip-unnumbered" option Before this time accel-ppp always worked in "ip unnumbered" mode. This option may turn this mode off (default is on) --- accel-pppd/libnetlink/iputils.c | 4 ++-- accel-pppd/libnetlink/iputils.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'accel-pppd/libnetlink') diff --git a/accel-pppd/libnetlink/iputils.c b/accel-pppd/libnetlink/iputils.c index fbb32c60..060fbab3 100644 --- a/accel-pppd/libnetlink/iputils.c +++ b/accel-pppd/libnetlink/iputils.c @@ -274,7 +274,7 @@ int __export ipaddr_add(int ifindex, in_addr_t addr, int mask) return 0; } -int __export ipaddr_del(int ifindex, in_addr_t addr) +int __export ipaddr_del(int ifindex, in_addr_t addr, int mask) { struct ipaddr_req { struct nlmsghdr n; @@ -295,7 +295,7 @@ int __export ipaddr_del(int ifindex, in_addr_t addr) req.n.nlmsg_type = RTM_DELADDR; req.i.ifa_family = AF_INET; req.i.ifa_index = ifindex; - req.i.ifa_prefixlen = 32; + req.i.ifa_prefixlen = mask; addattr32(&req.n, sizeof(req), IFA_LOCAL, addr); diff --git a/accel-pppd/libnetlink/iputils.h b/accel-pppd/libnetlink/iputils.h index 896b4cc5..75dfd1a4 100644 --- a/accel-pppd/libnetlink/iputils.h +++ b/accel-pppd/libnetlink/iputils.h @@ -12,7 +12,7 @@ int iplink_vlan_add(const char *ifname, int ifindex, int vid); int iplink_vlan_del(int ifindex); int ipaddr_add(int ifindex, in_addr_t addr, int mask); -int ipaddr_del(int ifindex, in_addr_t addr); +int ipaddr_del(int ifindex, in_addr_t addr, int mask); int iproute_add(int ifindex, in_addr_t src, in_addr_t dst, int proto); int iproute_del(int ifindex, in_addr_t dst, int proto); -- cgit v1.2.3