diff options
Diffstat (limited to '')
-rw-r--r-- | nhrpd/linux.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/nhrpd/linux.c b/nhrpd/linux.c index eb98166..e4df0dd 100644 --- a/nhrpd/linux.c +++ b/nhrpd/linux.c @@ -5,6 +5,7 @@ #include "zebra.h" +#include <fcntl.h> #include <errno.h> #include <linux/if_packet.h> @@ -96,25 +97,6 @@ int os_recvmsg(uint8_t *buf, size_t *len, int *ifindex, uint8_t *addr, return 0; } -static int linux_configure_arp(const char *iface, int on) -{ - struct ifreq ifr; - - strlcpy(ifr.ifr_name, iface, IFNAMSIZ); - if (ioctl(nhrp_socket_fd, SIOCGIFFLAGS, &ifr)) - return -1; - - if (on) - ifr.ifr_flags &= ~IFF_NOARP; - else - ifr.ifr_flags |= IFF_NOARP; - - if (ioctl(nhrp_socket_fd, SIOCSIFFLAGS, &ifr)) - return -1; - - return 0; -} - static int linux_icmp_redirect_off(const char *iface) { char fname[PATH_MAX]; @@ -142,7 +124,6 @@ int os_configure_dmvpn(unsigned int ifindex, const char *ifname, int af) ret |= linux_icmp_redirect_off(ifname); break; } - ret |= linux_configure_arp(ifname, 1); return ret; } |