diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2014-05-05 11:44:34 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2014-05-05 11:44:34 +0000 |
commit | 18b6c040c5c3734d518e173bf2f3ecb05a34f5ff (patch) | |
tree | fd140523ce2ccf1f83ff33b9bed91ae5aaea2eaa /sys/netinet | |
parent | 96b0ae647fa17dc27e4bc1b87de3978b2e5dbcbf (diff) |
Use a custom ifa_rtrequest function for point-to-point interfaces
instead of relying on hacks in nd6_rtrequest() to add a route to
loopback for each address configured on such interfaces.
While here document that abusing lo0 for local traffic is not safe
for interfaces in a non-default rdomain.
Tested by claudio@, jca@ and sthen@, ok sthen@
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/if_ether.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index 4286eaee5a9..2e8c294dd9d 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ether.c,v 1.125 2014/04/14 09:06:42 mpi Exp $ */ +/* $OpenBSD: if_ether.c,v 1.126 2014/05/05 11:44:33 mpi Exp $ */ /* $NetBSD: if_ether.c,v 1.31 1996/05/11 12:59:58 mycroft Exp $ */ /* @@ -254,6 +254,12 @@ arp_rtrequest(int req, struct rtentry *rt) SDL(gate)->sdl_alen = ETHER_ADDR_LEN; memcpy(LLADDR(SDL(gate)), ((struct arpcom *)ifp)->ac_enaddr, ETHER_ADDR_LEN); + + /* + * XXX Since lo0 is in the default rdomain we + * should not (ab)use it for any route related + * to an interface of a different rdomain. + */ if (useloopback) rt->rt_ifp = lo0ifp; /* |