summaryrefslogtreecommitdiff
path: root/sys/net/if_spppsubr.c
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2016-07-11 13:06:32 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2016-07-11 13:06:32 +0000
commitfdddc28e8d2b1b39c2d1d7bd7f1da5fea6c96a12 (patch)
treefd84a32037138d22eedff339937ad71816230a2b /sys/net/if_spppsubr.c
parentf00a2710ffcb9cfe5ca8a05fc3ae48077a8845fe (diff)
Path MTU discovery was slightly broken. I took two ICMP packets
to create and change the dynamic route. This behavior was introduced in net/route.c rev 1.269 when the gateway route allocation was moved from rt_setgateway() to _rtalloc(). So rtrequest(RTM_ADD) could return a route without a valid gateway route. To fix this, call rt_setgwroute() from _rtalloc() and rt_setgateway(). OK mpi@
Diffstat (limited to 'sys/net/if_spppsubr.c')
-rw-r--r--sys/net/if_spppsubr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c
index b4ea8f6dec6..4a480b2b177 100644
--- a/sys/net/if_spppsubr.c
+++ b/sys/net/if_spppsubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_spppsubr.c,v 1.154 2016/06/14 20:44:43 sthen Exp $ */
+/* $OpenBSD: if_spppsubr.c,v 1.155 2016/07/11 13:06:31 bluhm Exp $ */
/*
* Synchronous PPP link level subroutines.
*
@@ -4161,7 +4161,7 @@ sppp_update_gw_walker(struct rtentry *rt, void *arg, unsigned int id)
rt->rt_gateway->sa_family ||
!ISSET(rt->rt_flags, RTF_GATEWAY))
return (0); /* do not modify non-gateway routes */
- rt_setgate(rt, rt->rt_ifa->ifa_dstaddr);
+ rt_setgate(rt, rt->rt_ifa->ifa_dstaddr, ifp->if_rdomain);
}
return (0);
}