diff options
author | Kozlov Dmitry <xeb@mail.ru> | 2013-07-26 14:40:51 +0400 |
---|---|---|
committer | Kozlov Dmitry <xeb@mail.ru> | 2013-07-26 14:40:51 +0400 |
commit | 8b87afdbe8cbc9c0afdd47071071df2603f13edf (patch) | |
tree | 20d72998b7f66042a7924be028b34ad472ca7b44 /accel-pppd | |
parent | 56b69f5f1a585b32bb2fd0a89c9310ba98d7e86d (diff) | |
download | accel-ppp-8b87afdbe8cbc9c0afdd47071071df2603f13edf.tar.gz accel-ppp-8b87afdbe8cbc9c0afdd47071071df2603f13edf.zip |
ipoe: turn off kernel-mode proxy-arp on interfaces if proxy-arp=1|2
Diffstat (limited to 'accel-pppd')
-rw-r--r-- | accel-pppd/ctrl/ipoe/arp.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/accel-pppd/ctrl/ipoe/arp.c b/accel-pppd/ctrl/ipoe/arp.c index 4ea6688e..ee4ccded 100644 --- a/accel-pppd/ctrl/ipoe/arp.c +++ b/accel-pppd/ctrl/ipoe/arp.c @@ -133,7 +133,16 @@ struct arp_serv *arpd_start(struct ipoe_serv *ipoe) int sock; struct sockaddr_ll addr; struct arp_serv *s; - int f = 1; + int f = 1, fd; + char fname[1024]; + + sprintf(fname, "/proc/sys/net/ipv4/conf/%s/proxy_arp", ipoe->ifname); + fd = open(fname, O_WRONLY); + if (fd >= 0) { + fname[0] = '0'; + write(fd, fname, 1); + close(fd); + } sock = socket(PF_PACKET, SOCK_DGRAM, 0); if (sock < 0) { |