Date: Tue, 5 Nov 2013 07:32:10 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257689 - in head: sys/net sys/netinet sys/netpfil/ipfw usr.sbin/arp Message-ID: <201311050732.rA57WAAv058819@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Tue Nov 5 07:32:09 2013 New Revision: 257689 URL: http://svnweb.freebsd.org/changeset/base/257689 Log: Remove net.link.ether.inet.useloopback sysctl tunable. It was always on by default from the very beginning. It was placed in wrong namespace net.link.ether, originally it had been at another wrong namespace. It was incorrectly documented at incorrect manual page arp(8). Since new-ARP commit, the tunable have been consulted only on route addition, and ignored on route deletion. Behaviour of a system with tunable turned off is not fully correct, and has no advantages comparing to normal behavior. Modified: head/sys/net/if_var.h head/sys/netinet/if_ether.c head/sys/netinet/in.c head/sys/netpfil/ipfw/ip_fw2.c head/usr.sbin/arp/arp.4 Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Tue Nov 5 06:48:58 2013 (r257688) +++ head/sys/net/if_var.h Tue Nov 5 07:32:09 2013 (r257689) @@ -465,13 +465,11 @@ VNET_DECLARE(struct ifnethead, ifnet); VNET_DECLARE(struct ifgrouphead, ifg_head); VNET_DECLARE(int, if_index); VNET_DECLARE(struct ifnet *, loif); /* first loopback interface */ -VNET_DECLARE(int, useloopback); #define V_ifnet VNET(ifnet) #define V_ifg_head VNET(ifg_head) #define V_if_index VNET(if_index) #define V_loif VNET(loif) -#define V_useloopback VNET(useloopback) int if_addgroup(struct ifnet *, const char *); int if_delgroup(struct ifnet *, const char *); Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Tue Nov 5 06:48:58 2013 (r257688) +++ head/sys/netinet/if_ether.c Tue Nov 5 07:32:09 2013 (r257689) @@ -85,8 +85,6 @@ static SYSCTL_NODE(_net_link_ether, PF_A static VNET_DEFINE(int, arpt_keep) = (20*60); /* once resolved, good for 20 * minutes */ static VNET_DEFINE(int, arp_maxtries) = 5; -VNET_DEFINE(int, useloopback) = 1; /* use loopback interface for - * local traffic */ static VNET_DEFINE(int, arp_proxyall) = 0; static VNET_DEFINE(int, arpt_down) = 20; /* keep incomplete entries for * 20 seconds */ @@ -111,9 +109,6 @@ SYSCTL_VNET_INT(_net_link_ether_inet, OI SYSCTL_VNET_INT(_net_link_ether_inet, OID_AUTO, maxtries, CTLFLAG_RW, &VNET_NAME(arp_maxtries), 0, "ARP resolution attempts before returning error"); -SYSCTL_VNET_INT(_net_link_ether_inet, OID_AUTO, useloopback, CTLFLAG_RW, - &VNET_NAME(useloopback), 0, - "Use the loopback interface for local traffic"); SYSCTL_VNET_INT(_net_link_ether_inet, OID_AUTO, proxyall, CTLFLAG_RW, &VNET_NAME(arp_proxyall), 0, "Enable proxy ARP for all suitable requests"); Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Tue Nov 5 06:48:58 2013 (r257688) +++ head/sys/netinet/in.c Tue Nov 5 07:32:09 2013 (r257689) @@ -856,7 +856,7 @@ in_ifinit(struct ifnet *ifp, struct in_i /* * add a loopback route to self */ - if (V_useloopback && !vhid && !(ifp->if_flags & IFF_LOOPBACK)) { + if (!vhid && !(ifp->if_flags & IFF_LOOPBACK)) { struct route ia_ro; bzero(&ia_ro, sizeof(ia_ro)); Modified: head/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw2.c Tue Nov 5 06:48:58 2013 (r257688) +++ head/sys/netpfil/ipfw/ip_fw2.c Tue Nov 5 07:32:09 2013 (r257689) @@ -434,7 +434,7 @@ verify_path(struct in_addr src, struct i * If ifp is provided, check for equality with rtentry. * We should use rt->rt_ifa->ifa_ifp, instead of rt->rt_ifp, * in order to pass packets injected back by if_simloop(): - * if useloopback == 1 routing entry (via lo0) for our own address + * routing entry (via lo0) for our own address * may exist, so we need to handle routing assymetry. */ if (ifp != NULL && ro.ro_rt->rt_ifa->ifa_ifp != ifp) { Modified: head/usr.sbin/arp/arp.4 ============================================================================== --- head/usr.sbin/arp/arp.4 Tue Nov 5 06:48:58 2013 (r257688) +++ head/usr.sbin/arp/arp.4 Tue Nov 5 07:32:09 2013 (r257689) @@ -28,7 +28,7 @@ .\" @(#)arp4.4 6.5 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd May 11, 2013 +.Dd November 5, 2013 .Dt ARP 4 .Os .Sh NAME @@ -165,10 +165,6 @@ Default is 5 tries. .It Va proxyall Enables ARP proxying for all hosts on net. Turned off by default. -.It Va useloopback -If an ARP entry is added for local address, force the traffic to go through -the loopback interface. -Turned on by default. .It Va wait Lifetime of an incomplete ARP entry. Default is 20 seconds.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311050732.rA57WAAv058819>