diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2014-05-26 10:55:57 +0400 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2014-05-26 10:55:57 +0400 |
commit | 30397cca6a4472f3087d1071ecc43438e39f705f (patch) | |
tree | 79d5efb808e1b8c04d6587c876e474158a44d813 /accel-pppd/libnetlink | |
parent | 33ca7f48ec3369301c1f0ce4aa1abe306151af76 (diff) | |
download | accel-ppp-30397cca6a4472f3087d1071ecc43438e39f705f.tar.gz accel-ppp-30397cca6a4472f3087d1071ecc43438e39f705f.zip |
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)
Diffstat (limited to 'accel-pppd/libnetlink')
-rw-r--r-- | accel-pppd/libnetlink/iputils.c | 4 | ||||
-rw-r--r-- | accel-pppd/libnetlink/iputils.h | 2 |
2 files changed, 3 insertions, 3 deletions
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); |