tcp_ipv4.c (d83d8461f902c672bc1bd8fbc6a94e19f092da97) tcp_ipv4.c (40efc6fa179f440a008333ea98f701bc35a1f97f)
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * Implementation of the Transmission Control Protocol(TCP).
7 *
8 * Version: $Id: tcp_ipv4.c,v 1.240 2002/02/01 22:01:04 davem Exp $

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

265 sk->sk_route_caps = 0;
266 inet->dport = 0;
267 return err;
268}
269
270/*
271 * This routine does path mtu discovery as defined in RFC1191.
272 */
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * Implementation of the Transmission Control Protocol(TCP).
7 *
8 * Version: $Id: tcp_ipv4.c,v 1.240 2002/02/01 22:01:04 davem Exp $

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

265 sk->sk_route_caps = 0;
266 inet->dport = 0;
267 return err;
268}
269
270/*
271 * This routine does path mtu discovery as defined in RFC1191.
272 */
273static inline void do_pmtu_discovery(struct sock *sk, struct iphdr *iph,
274 u32 mtu)
273static void do_pmtu_discovery(struct sock *sk, struct iphdr *iph, u32 mtu)
275{
276 struct dst_entry *dst;
277 struct inet_sock *inet = inet_sk(sk);
278
279 /* We are not interested in TCP_LISTEN and open_requests (SYN-ACKs
280 * send out by Linux are always <576bytes so they should go through
281 * unfragmented).
282 */

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

657/*
658 * IPv4 request_sock destructor.
659 */
660static void tcp_v4_reqsk_destructor(struct request_sock *req)
661{
662 kfree(inet_rsk(req)->opt);
663}
664
274{
275 struct dst_entry *dst;
276 struct inet_sock *inet = inet_sk(sk);
277
278 /* We are not interested in TCP_LISTEN and open_requests (SYN-ACKs
279 * send out by Linux are always <576bytes so they should go through
280 * unfragmented).
281 */

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

656/*
657 * IPv4 request_sock destructor.
658 */
659static void tcp_v4_reqsk_destructor(struct request_sock *req)
660{
661 kfree(inet_rsk(req)->opt);
662}
663
665static inline void syn_flood_warning(struct sk_buff *skb)
664static void syn_flood_warning(struct sk_buff *skb)
666{
667 static unsigned long warntime;
668
669 if (time_after(jiffies, (warntime + HZ * 60))) {
670 warntime = jiffies;
671 printk(KERN_INFO
672 "possible SYN flooding on port %d. Sending cookies.\n",
673 ntohs(skb->h.th->dest));
674 }
675}
676
677/*
678 * Save and compile IPv4 options into the request_sock if needed.
679 */
665{
666 static unsigned long warntime;
667
668 if (time_after(jiffies, (warntime + HZ * 60))) {
669 warntime = jiffies;
670 printk(KERN_INFO
671 "possible SYN flooding on port %d. Sending cookies.\n",
672 ntohs(skb->h.th->dest));
673 }
674}
675
676/*
677 * Save and compile IPv4 options into the request_sock if needed.
678 */
680static inline struct ip_options *tcp_v4_save_options(struct sock *sk,
681 struct sk_buff *skb)
679static struct ip_options *tcp_v4_save_options(struct sock *sk,
680 struct sk_buff *skb)
682{
683 struct ip_options *opt = &(IPCB(skb)->opt);
684 struct ip_options *dopt = NULL;
685
686 if (opt && opt->optlen) {
687 int opt_size = optlength(opt);
688 dopt = kmalloc(opt_size, GFP_ATOMIC);
689 if (dopt) {

--- 1175 unchanged lines hidden ---
681{
682 struct ip_options *opt = &(IPCB(skb)->opt);
683 struct ip_options *dopt = NULL;
684
685 if (opt && opt->optlen) {
686 int opt_size = optlength(opt);
687 dopt = kmalloc(opt_size, GFP_ATOMIC);
688 if (dopt) {

--- 1175 unchanged lines hidden ---