From 8b87afdbe8cbc9c0afdd47071071df2603f13edf Mon Sep 17 00:00:00 2001 From: Kozlov Dmitry Date: Fri, 26 Jul 2013 14:40:51 +0400 Subject: ipoe: turn off kernel-mode proxy-arp on interfaces if proxy-arp=1|2 --- accel-pppd/ctrl/ipoe/arp.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'accel-pppd') diff --git a/accel-pppd/ctrl/ipoe/arp.c b/accel-pppd/ctrl/ipoe/arp.c index 4ea6688..ee4ccde 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) { -- cgit v1.2.3