diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2017-04-19 15:21:55 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2017-04-19 15:21:55 +0000 |
commit | 3c74bbd95f27b43502ef7e7923c49587fff96320 (patch) | |
tree | 6a48c468cebe98a8a4309b290a0b3bcaf433455d /sys/netinet | |
parent | c12beea5d405e19d16a51f1973d8aa82ad6a5004 (diff) |
Use the rt_rmx defines that hide the struct rt_kmetrics indirection.
No binary change.
OK mpi@
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_icmp.c | 18 | ||||
-rw-r--r-- | sys/netinet/ip_input.c | 6 | ||||
-rw-r--r-- | sys/netinet/ip_output.c | 14 | ||||
-rw-r--r-- | sys/netinet/tcp_input.c | 8 | ||||
-rw-r--r-- | sys/netinet/tcp_subr.c | 4 | ||||
-rw-r--r-- | sys/netinet/tcp_timer.c | 8 |
6 files changed, 29 insertions, 29 deletions
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index 9d2d85fec6e..7712058a152 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_icmp.c,v 1.165 2017/04/14 20:46:31 bluhm Exp $ */ +/* $OpenBSD: ip_icmp.c,v 1.166 2017/04/19 15:21:54 bluhm Exp $ */ /* $NetBSD: ip_icmp.c,v 1.19 1996/02/13 23:42:22 christos Exp $ */ /* @@ -1021,12 +1021,12 @@ icmp_mtudisc(struct icmp *icp, u_int rtableid) mtu = ntohs(icp->icmp_ip.ip_len); /* Some 4.2BSD-based routers incorrectly adjust the ip_len */ - if (mtu > rt->rt_rmx.rmx_mtu && rt->rt_rmx.rmx_mtu != 0) + if (mtu > rt->rt_mtu && rt->rt_mtu != 0) mtu -= (icp->icmp_ip.ip_hl << 2); /* If we still can't guess a value, try the route */ if (mtu == 0) { - mtu = rt->rt_rmx.rmx_mtu; + mtu = rt->rt_mtu; /* If no route mtu, default to the interface mtu */ @@ -1048,11 +1048,11 @@ icmp_mtudisc(struct icmp *icp, u_int rtableid) * on a route. We should be using a separate flag * for the kernel to indicate this. */ - if ((rt->rt_rmx.rmx_locks & RTV_MTU) == 0) { + if ((rt->rt_locks & RTV_MTU) == 0) { if (mtu < 296 || mtu > ifp->if_mtu) - rt->rt_rmx.rmx_locks |= RTV_MTU; - else if (rt->rt_rmx.rmx_mtu > mtu || rt->rt_rmx.rmx_mtu == 0) - rt->rt_rmx.rmx_mtu = mtu; + rt->rt_locks |= RTV_MTU; + else if (rt->rt_mtu > mtu || rt->rt_mtu == 0) + rt->rt_mtu = mtu; } if_put(ifp); @@ -1084,8 +1084,8 @@ icmp_mtudisc_timeout(struct rtentry *rt, struct rttimer *r) (*ctlfunc)(PRC_MTUINC, sintosa(&sin), r->rtt_tableid, NULL); } else { - if ((rt->rt_rmx.rmx_locks & RTV_MTU) == 0) - rt->rt_rmx.rmx_mtu = 0; + if ((rt->rt_locks & RTV_MTU) == 0) + rt->rt_mtu = 0; } if_put(ifp); diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 1f0814e58d5..9c55f8ebf12 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_input.c,v 1.297 2017/04/14 20:46:31 bluhm Exp $ */ +/* $OpenBSD: ip_input.c,v 1.298 2017/04/19 15:21:54 bluhm Exp $ */ /* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */ /* @@ -1512,8 +1512,8 @@ ip_forward(struct mbuf *m, struct ifnet *ifp, struct rtentry *rt, int srcrt) #ifdef IPSEC if (rt != NULL) { - if (rt->rt_rmx.rmx_mtu) - destmtu = rt->rt_rmx.rmx_mtu; + if (rt->rt_mtu) + destmtu = rt->rt_mtu; else { struct ifnet *destifp; diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index da223746a4e..aa2d3dd2380 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_output.c,v 1.338 2017/04/11 14:43:49 dhill Exp $ */ +/* $OpenBSD: ip_output.c,v 1.339 2017/04/19 15:21:54 bluhm Exp $ */ /* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */ /* @@ -220,7 +220,7 @@ reroute: error = EHOSTUNREACH; goto bad; } - if ((mtu = ro->ro_rt->rt_rmx.rmx_mtu) == 0) + if ((mtu = ro->ro_rt->rt_mtu) == 0) mtu = ifp->if_mtu; if (ro->ro_rt->rt_flags & RTF_GATEWAY) @@ -399,7 +399,7 @@ sendit: * the route's MTU is locked. */ if ((flags & IP_MTUDISC) && ro && ro->ro_rt && - (ro->ro_rt->rt_rmx.rmx_locks & RTV_MTU) == 0) + (ro->ro_rt->rt_locks & RTV_MTU) == 0) ip->ip_off |= htons(IP_DF); #ifdef IPSEC @@ -488,9 +488,9 @@ sendit: */ 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; + !(ro->ro_rt->rt_locks & RTV_MTU) && + (ro->ro_rt->rt_mtu > ifp->if_mtu)) { + ro->ro_rt->rt_mtu = ifp->if_mtu; } ipstat_inc(ips_cantfrag); goto bad; @@ -611,7 +611,7 @@ ip_output_ipsec_send(struct tdb *tdb, struct mbuf *m, struct ifnet *ifp, DPRINTF(("%s: spi %08x mtu %d rt %p cloned %d\n", __func__, ntohl(tdb->tdb_spi), tdb->tdb_mtu, rt, rt_mtucloned)); if (rt != NULL) { - rt->rt_rmx.rmx_mtu = tdb->tdb_mtu; + rt->rt_mtu = tdb->tdb_mtu; if (ro && ro->ro_rt != NULL) { rtfree(ro->ro_rt); ro->ro_rt = rtalloc(&ro->ro_dst, RT_RESOLVE, diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 4fdfac19491..cc6c08609be 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_input.c,v 1.340 2017/04/17 20:59:35 bluhm Exp $ */ +/* $OpenBSD: tcp_input.c,v 1.341 2017/04/19 15:21:54 bluhm Exp $ */ /* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */ /* @@ -2950,12 +2950,12 @@ tcp_mss(struct tcpcb *tp, int offer) * if there's an mtu associated with the route and we support * path MTU discovery for the underlying protocol family, use it. */ - if (rt->rt_rmx.rmx_mtu) { + if (rt->rt_mtu) { /* * One may wish to lower MSS to take into account options, * especially security-related options. */ - if (tp->pf == AF_INET6 && rt->rt_rmx.rmx_mtu < IPV6_MMTU) { + if (tp->pf == AF_INET6 && rt->rt_mtu < IPV6_MMTU) { /* * RFC2460 section 5, last paragraph: if path MTU is * smaller than 1280, use 1280 as packet size and @@ -2964,7 +2964,7 @@ tcp_mss(struct tcpcb *tp, int offer) mss = IPV6_MMTU - iphlen - sizeof(struct ip6_frag) - sizeof(struct tcphdr); } else { - mss = rt->rt_rmx.rmx_mtu - iphlen - + mss = rt->rt_mtu - iphlen - sizeof(struct tcphdr); } } else if (ifp->if_flags & IFF_LOOPBACK) { diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index fac36f32b37..931b8ec3d59 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_subr.c,v 1.160 2017/02/09 15:19:32 jca Exp $ */ +/* $OpenBSD: tcp_subr.c,v 1.161 2017/04/19 15:21:54 bluhm Exp $ */ /* $NetBSD: tcp_subr.c,v 1.22 1996/02/13 23:44:00 christos Exp $ */ /* @@ -884,7 +884,7 @@ tcp_mtudisc(struct inpcb *inp, int errno) return; } if (orig_maxseg != tp->t_maxseg || - (rt->rt_rmx.rmx_locks & RTV_MTU)) + (rt->rt_locks & RTV_MTU)) change = 1; } tcp_mss(tp, -1); diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c index 2d615437284..72854fa11bd 100644 --- a/sys/netinet/tcp_timer.c +++ b/sys/netinet/tcp_timer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_timer.c,v 1.54 2017/02/09 15:19:32 jca Exp $ */ +/* $OpenBSD: tcp_timer.c,v 1.55 2017/04/19 15:21:54 bluhm Exp $ */ /* $NetBSD: tcp_timer.c,v 1.14 1996/02/13 23:44:09 christos Exp $ */ /* @@ -261,7 +261,7 @@ tcp_timer_rexmt(void *arg) rt = in_pcbrtentry(inp); /* Check if path MTU discovery is disabled already */ if (rt && (rt->rt_flags & RTF_HOST) && - (rt->rt_rmx.rmx_locks & RTV_MTU)) + (rt->rt_locks & RTV_MTU)) goto leave; rt = NULL; @@ -282,8 +282,8 @@ tcp_timer_rexmt(void *arg) } if (rt != NULL) { /* Disable path MTU discovery */ - if ((rt->rt_rmx.rmx_locks & RTV_MTU) == 0) { - rt->rt_rmx.rmx_locks |= RTV_MTU; + if ((rt->rt_locks & RTV_MTU) == 0) { + rt->rt_locks |= RTV_MTU; in_rtchange(inp, 0); } |