summaryrefslogtreecommitdiff
path: root/sys/net/if_pppx.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2014-05-05 11:44:34 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2014-05-05 11:44:34 +0000
commit18b6c040c5c3734d518e173bf2f3ecb05a34f5ff (patch)
treefd140523ce2ccf1f83ff33b9bed91ae5aaea2eaa /sys/net/if_pppx.c
parent96b0ae647fa17dc27e4bc1b87de3978b2e5dbcbf (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/net/if_pppx.c')
-rw-r--r--sys/net/if_pppx.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/net/if_pppx.c b/sys/net/if_pppx.c
index 37a971504ef..66b2a836043 100644
--- a/sys/net/if_pppx.c
+++ b/sys/net/if_pppx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pppx.c,v 1.29 2014/04/08 04:26:53 miod Exp $ */
+/* $OpenBSD: if_pppx.c,v 1.30 2014/05/05 11:44:33 mpi Exp $ */
/*
* Copyright (c) 2010 Claudio Jeker <claudio@openbsd.org>
@@ -1094,10 +1094,14 @@ pppx_if_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr)
{
struct pppx_if *pxi = (struct pppx_if *)ifp->if_softc;
struct ifreq *ifr = (struct ifreq *)addr;
+ struct ifaddr *ifa = (struct ifaddr *)addr;
int error = 0;
switch (cmd) {
case SIOCSIFADDR:
+ ifa->ifa_rtrequest = p2p_rtrequest;
+ break;
+
case SIOCSIFFLAGS:
break;