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.
This commit is contained in:
parent
8696ad7613
commit
bce78dfe17
@ -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 *);
|
||||
|
@ -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");
|
||||
|
@ -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));
|
||||
|
@ -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) {
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user