No binary change.
OK mpi@
-/* $OpenBSD: if_loop.c,v 1.80 2017/01/24 10:08:30 krw Exp $ */
+/* $OpenBSD: if_loop.c,v 1.81 2017/04/19 15:21:54 bluhm Exp $ */
/* $NetBSD: if_loop.c,v 1.15 1996/05/07 02:40:33 thorpej Exp $ */
/*
void
lortrequest(struct ifnet *ifp, int cmd, struct rtentry *rt)
{
- if (rt && rt->rt_rmx.rmx_mtu == 0)
- rt->rt_rmx.rmx_mtu = LOMTU;
+ if (rt && rt->rt_mtu == 0)
+ rt->rt_mtu = LOMTU;
}
/*
-/* $OpenBSD: route.c,v 1.354 2017/03/06 08:56:39 mpi Exp $ */
+/* $OpenBSD: route.c,v 1.355 2017/04/19 15:21:54 bluhm Exp $ */
/* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */
/*
long current_time;
current_time = time_uptime;
- rt->rt_rmx.rmx_expire = time_uptime + queue->rtq_timeout;
+ rt->rt_expire = time_uptime + queue->rtq_timeout;
/*
* If there's already a timer with this action, destroy it before
-/* $OpenBSD: rtsock.c,v 1.236 2017/04/05 13:35:18 deraadt Exp $ */
+/* $OpenBSD: rtsock.c,v 1.237 2017/04/19 15:21:54 bluhm Exp $ */
/* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */
/*
info->rti_info[RTAX_NETMASK]);
/* FALLTHROUGH */
case RTM_LOCK:
- rt->rt_rmx.rmx_locks &= ~(rtm->rtm_inits);
- rt->rt_rmx.rmx_locks |=
+ rt->rt_locks &= ~(rtm->rtm_inits);
+ rt->rt_locks |=
(rtm->rtm_inits & rtm->rtm_rmx.rmx_locks);
break;
}
-/* $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 $ */
/*
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 */
* 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);
(*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);
-/* $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 $ */
/*
#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;
-/* $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 $ */
/*
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)
* 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
*/
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;
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,
-/* $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 $ */
/*
* 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
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) {
-/* $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 $ */
/*
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);
-/* $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 $ */
/*
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;
}
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);
}
-/* $OpenBSD: icmp6.c,v 1.205 2017/04/14 20:46:31 bluhm Exp $ */
+/* $OpenBSD: icmp6.c,v 1.206 2017/04/19 15:21:54 bluhm Exp $ */
/* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */
/*
rt = icmp6_mtudisc_clone(sin6tosa(&sin6), m->m_pkthdr.ph_rtableid);
if (rt != NULL && ISSET(rt->rt_flags, RTF_HOST) &&
- !(rt->rt_rmx.rmx_locks & RTV_MTU) &&
- (rt->rt_rmx.rmx_mtu > mtu || rt->rt_rmx.rmx_mtu == 0)) {
+ !(rt->rt_locks & RTV_MTU) &&
+ (rt->rt_mtu > mtu || rt->rt_mtu == 0)) {
struct ifnet *ifp;
ifp = if_get(rt->rt_ifidx);
if (ifp != NULL && mtu < ifp->if_mtu) {
icmp6stat_inc(icp6s_pmtuchg);
- rt->rt_rmx.rmx_mtu = mtu;
+ rt->rt_mtu = mtu;
}
if_put(ifp);
}
if ((rt->rt_flags & (RTF_DYNAMIC|RTF_HOST)) == (RTF_DYNAMIC|RTF_HOST)) {
rtdeletemsg(rt, ifp, r->rtt_tableid);
} else {
- if (!(rt->rt_rmx.rmx_locks & RTV_MTU))
- rt->rt_rmx.rmx_mtu = 0;
+ if (!(rt->rt_locks & RTV_MTU))
+ rt->rt_mtu = 0;
}
if_put(ifp);
-/* $OpenBSD: ip6_output.c,v 1.226 2017/02/21 15:33:52 dhill Exp $ */
+/* $OpenBSD: ip6_output.c,v 1.227 2017/04/19 15:21:54 bluhm Exp $ */
/* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */
/*
* The mbuf chain containing the packet will be freed.
* The mbuf opt, if present, will not be freed.
*
- * type of "mtu": rt_rmx.rmx_mtu is u_long, ifnet.ifr_mtu is int, and
+ * type of "mtu": rt_mtu is u_long, ifnet.ifr_mtu is int, and
* nd_ifinfo.linkmtu is u_int32_t. so we use u_long to hold largest one,
- * which is rt_rmx.rmx_mtu.
+ * which is rt_mtu.
*/
int
ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, struct route_in6 *ro,
int error = 0;
if (rt != NULL) {
- mtu = rt->rt_rmx.rmx_mtu;
+ mtu = rt->rt_mtu;
if (mtu == 0)
mtu = ifp->if_mtu;
else if (mtu < IPV6_MMTU) {
* field isn't locked).
*/
mtu = ifp->if_mtu;
- if (!(rt->rt_rmx.rmx_locks & RTV_MTU))
- rt->rt_rmx.rmx_mtu = mtu;
+ if (!(rt->rt_locks & RTV_MTU))
+ rt->rt_mtu = mtu;
}
} else {
mtu = ifp->if_mtu;