diff options
author | 2015-10-19 12:10:05 +0000 | |
---|---|---|
committer | 2015-10-19 12:10:05 +0000 | |
commit | 4b4e5248e57a916917f0a2c75187bdb3d91bcf1a (patch) | |
tree | 65e8c136dd037150cd363f44e7cc54812929e669 /sys/netinet/ip_output.c | |
parent | Sync rtisvalid(9) check for local route entries with r1.257 of (diff) | |
download | wireguard-openbsd-4b4e5248e57a916917f0a2c75187bdb3d91bcf1a.tar.xz wireguard-openbsd-4b4e5248e57a916917f0a2c75187bdb3d91bcf1a.zip |
Stop checking for RTF_UP directly, call rtisvalid(9) instead.
While here add a missing ``rtableid'' check in in_selectsrc().
ok bluhm@
Diffstat (limited to 'sys/netinet/ip_output.c')
-rw-r--r-- | sys/netinet/ip_output.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 11af574b2b4..8d575b7904d 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_output.c,v 1.301 2015/10/13 10:16:17 mpi Exp $ */ +/* $OpenBSD: ip_output.c,v 1.302 2015/10/19 12:10:05 mpi Exp $ */ /* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */ /* @@ -588,8 +588,8 @@ sendit: * them, there is no way for one to update all its * routes when the MTU is changed. */ - if (ro->ro_rt != NULL && - (ro->ro_rt->rt_flags & (RTF_UP | RTF_HOST)) && + if (rtisvalid(ro->ro_rt) && + ISSET(ro->ro_rt->rt_flags, RTF_HOST) && !(ro->ro_rt->rt_rmx.rmx_locks & RTV_MTU) && (ro->ro_rt->rt_rmx.rmx_mtu > ifp->if_mtu)) { ro->ro_rt->rt_rmx.rmx_mtu = ifp->if_mtu; |