Deleted Added
sdiff udiff text old ( 69303 ) new ( 78410 )
full compact
1/*-
2 * Copyright (c) 2000 Ruslan Ermilov and Brian Somers <brian@Awfulhak.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/usr.sbin/ppp/tcpmss.c 69303 2000-11-28 13:18:35Z brian $
27 */
28
29#include <sys/param.h>
30
31#include <netinet/in_systm.h>
32#include <netinet/in.h>
33#include <netinet/ip.h>
34#include <netinet/tcp.h>
35#include <sys/un.h>
36
37#include <termios.h>
38

--- 10 unchanged lines hidden (view full) ---

49#include "ccp.h"
50#include "link.h"
51#include "iplist.h"
52#include "slcompress.h"
53#include "ipcp.h"
54#include "filter.h"
55#include "descriptor.h"
56#include "mp.h"
57#ifndef NORADIUS
58#include "radius.h"
59#endif
60#include "bundle.h"
61
62
63/*-
64 * We are in a liberal position about MSS

--- 23 unchanged lines hidden (view full) ---

88 /*
89 * Check for MSS option only for TCP packets with zero fragment offsets
90 * and correct total and header lengths.
91 */
92 if (pip->ip_p == IPPROTO_TCP && (ntohs(pip->ip_off) & IP_OFFMASK) == 0 &&
93 ntohs(pip->ip_len) == plen && hlen <= plen &&
94 plen - hlen >= sizeof(struct tcphdr))
95 MSSFixup((struct tcphdr *)(MBUF_CTOP(bp) + hlen), plen - hlen,
96 MAXMSS(bundle->mtu));
97
98 return bp;
99}
100
101/*-
102 * The following macro is used to update an
103 * internet checksum. "acc" is a 32-bit
104 * accumulation of all the changes to the

--- 64 unchanged lines hidden ---