diff options
author | 2015-10-28 12:14:25 +0000 | |
---|---|---|
committer | 2015-10-28 12:14:25 +0000 | |
commit | a923c8476c6771493ee2bc4f277a429c9ae3eaff (patch) | |
tree | 0ce39e85d1a8d040b51bfbaf124adc5a92525b3a /sys/netinet/tcp_input.c | |
parent | sync (diff) | |
download | wireguard-openbsd-a923c8476c6771493ee2bc4f277a429c9ae3eaff.tar.xz wireguard-openbsd-a923c8476c6771493ee2bc4f277a429c9ae3eaff.zip |
Remove linkmtu and maxmtu from struct nd_ifinfo. IN6_LINKMTU can now
die and ifp->if_mtu is the one true mtu.
Suggested by and OK mpi@
Diffstat (limited to 'sys/netinet/tcp_input.c')
-rw-r--r-- | sys/netinet/tcp_input.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index a77cc639190..287a45a4881 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_input.c,v 1.306 2015/10/24 16:08:48 mpi Exp $ */ +/* $OpenBSD: tcp_input.c,v 1.307 2015/10/28 12:14:25 florian Exp $ */ /* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */ /* @@ -3045,22 +3045,13 @@ tcp_mss(struct tcpcb *tp, int offer) * for IPv6, path MTU discovery is always turned on, * or the node must use packet size <= 1280. */ - mss = IN6_LINKMTU(ifp) - iphlen - sizeof(struct tcphdr); + mss = ifp->if_mtu - iphlen - sizeof(struct tcphdr); } #endif /* INET6 */ /* Calculate the value that we offer in TCPOPT_MAXSEG */ if (offer != -1) { -#ifndef INET6 mssopt = ifp->if_mtu - iphlen - sizeof(struct tcphdr); -#else - if (tp->pf == AF_INET6) - mssopt = IN6_LINKMTU(ifp) - iphlen - - sizeof(struct tcphdr); - else - mssopt = ifp->if_mtu - iphlen - sizeof(struct tcphdr); -#endif - mssopt = max(tcp_mssdflt, mssopt); } @@ -3272,7 +3263,7 @@ tcp_mss_adv(struct mbuf *m, int af) #ifdef INET6 case AF_INET6: if (ifp != NULL) - mss = IN6_LINKMTU(ifp); + mss = ifp->if_mtu; iphlen = sizeof(struct ip6_hdr); break; #endif |