diff options
author | glebius <glebius@FreeBSD.org> | 2013-11-05 07:32:09 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2013-11-05 07:32:09 +0000 |
commit | bce78dfe179929ceecbfdee04dfb909517d70d13 (patch) | |
tree | b4250ebe7a2bc814d7e59fd488598fcf8a78b91a | |
parent | 8696ad7613c4e7ab44f4555f64e30b7ad8b5481f (diff) | |
download | FreeBSD-src-bce78dfe179929ceecbfdee04dfb909517d70d13.zip FreeBSD-src-bce78dfe179929ceecbfdee04dfb909517d70d13.tar.gz |
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.
-rw-r--r-- | sys/net/if_var.h | 2 | ||||
-rw-r--r-- | sys/netinet/if_ether.c | 5 | ||||
-rw-r--r-- | sys/netinet/in.c | 2 | ||||
-rw-r--r-- | sys/netpfil/ipfw/ip_fw2.c | 2 | ||||
-rw-r--r-- | usr.sbin/arp/arp.4 | 6 |
5 files changed, 3 insertions, 14 deletions
diff --git a/sys/net/if_var.h b/sys/net/if_var.h index f918a39..22ccbd9 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -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 *); diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index 57fc09d..6228ea4 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -85,8 +85,6 @@ static SYSCTL_NODE(_net_link_ether, PF_ARP, arp, CTLFLAG_RW, 0, ""); 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, OID_AUTO, max_age, CTLFLAG_RW, 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"); diff --git a/sys/netinet/in.c b/sys/netinet/in.c index 30f0273..6ed9550 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -856,7 +856,7 @@ in_ifinit(struct ifnet *ifp, struct in_ifaddr *ia, struct sockaddr_in *sin, /* * 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)); diff --git a/sys/netpfil/ipfw/ip_fw2.c b/sys/netpfil/ipfw/ip_fw2.c index 10afeae..aa6d9e3 100644 --- a/sys/netpfil/ipfw/ip_fw2.c +++ b/sys/netpfil/ipfw/ip_fw2.c @@ -434,7 +434,7 @@ verify_path(struct in_addr src, struct ifnet *ifp, u_int fib) * 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) { diff --git a/usr.sbin/arp/arp.4 b/usr.sbin/arp/arp.4 index 93cfd07..7bfa8ec 100644 --- a/usr.sbin/arp/arp.4 +++ b/usr.sbin/arp/arp.4 @@ -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. |