syncookies.c (463c84b97f24010a67cd871746d6a7e4c925a5f9) | syncookies.c (20380731bc2897f2952ae055420972ded4cd786e) |
---|---|
1/* 2 * Syncookies implementation for the Linux kernel 3 * 4 * Copyright (C) 1997 Andi Kleen 5 * Based on ideas by D.J.Bernstein and Eric Schenk. 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License --- 155 unchanged lines hidden (view full) --- 164 mssind = check_tcp_syn_cookie(cookie, 165 skb->nh.iph->saddr, skb->nh.iph->daddr, 166 skb->h.th->source, skb->h.th->dest, 167 seq, jiffies / (HZ * 60), COUNTER_TRIES); 168 169 return mssind < NUM_MSS ? msstab[mssind] + 1 : 0; 170} 171 | 1/* 2 * Syncookies implementation for the Linux kernel 3 * 4 * Copyright (C) 1997 Andi Kleen 5 * Based on ideas by D.J.Bernstein and Eric Schenk. 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License --- 155 unchanged lines hidden (view full) --- 164 mssind = check_tcp_syn_cookie(cookie, 165 skb->nh.iph->saddr, skb->nh.iph->daddr, 166 skb->h.th->source, skb->h.th->dest, 167 seq, jiffies / (HZ * 60), COUNTER_TRIES); 168 169 return mssind < NUM_MSS ? msstab[mssind] + 1 : 0; 170} 171 |
172extern struct request_sock_ops tcp_request_sock_ops; 173 | |
174static inline struct sock *get_cookie_sock(struct sock *sk, struct sk_buff *skb, 175 struct request_sock *req, 176 struct dst_entry *dst) 177{ 178 struct tcp_sock *tp = tcp_sk(sk); 179 struct sock *child; 180 181 child = tp->af_specific->syn_recv_sock(sk, skb, req, dst); --- 99 unchanged lines hidden --- | 172static inline struct sock *get_cookie_sock(struct sock *sk, struct sk_buff *skb, 173 struct request_sock *req, 174 struct dst_entry *dst) 175{ 176 struct tcp_sock *tp = tcp_sk(sk); 177 struct sock *child; 178 179 child = tp->af_specific->syn_recv_sock(sk, skb, req, dst); --- 99 unchanged lines hidden --- |