mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: Documentation/devicetree/bindings/net/micrel-ks8851.txt net/core/netpoll.c The net/core/netpoll.c conflict is a bug fix in 'net' happening to code which is completely removed in 'net-next'. In micrel-ks8851.txt we simply have overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
04f58c8854
129 changed files with 973 additions and 786 deletions
|
@ -480,20 +480,21 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
|
|||
struct ip_options *opt);
|
||||
#ifdef CONFIG_SYN_COOKIES
|
||||
|
||||
/* Syncookies use a monotonic timer which increments every 64 seconds.
|
||||
/* Syncookies use a monotonic timer which increments every 60 seconds.
|
||||
* This counter is used both as a hash input and partially encoded into
|
||||
* the cookie value. A cookie is only validated further if the delta
|
||||
* between the current counter value and the encoded one is less than this,
|
||||
* i.e. a sent cookie is valid only at most for 128 seconds (or less if
|
||||
* i.e. a sent cookie is valid only at most for 2*60 seconds (or less if
|
||||
* the counter advances immediately after a cookie is generated).
|
||||
*/
|
||||
#define MAX_SYNCOOKIE_AGE 2
|
||||
|
||||
static inline u32 tcp_cookie_time(void)
|
||||
{
|
||||
struct timespec now;
|
||||
getnstimeofday(&now);
|
||||
return now.tv_sec >> 6; /* 64 seconds granularity */
|
||||
u64 val = get_jiffies_64();
|
||||
|
||||
do_div(val, 60 * HZ);
|
||||
return val;
|
||||
}
|
||||
|
||||
u32 __cookie_v4_init_sequence(const struct iphdr *iph, const struct tcphdr *th,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue