Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41632
b: refs/heads/master
c: a94f723
h: refs/heads/master
v: v3
  • Loading branch information
Gerrit Renker authored and David S. Miller committed Dec 3, 2006
1 parent e9cf397 commit f18e368
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6f4e5fff1e4d46714ea554fd83e44eab534e8b11
refs/heads/master: a94f723d595ee085f81b1788d18e031af7eeba91
4 changes: 2 additions & 2 deletions trunk/net/ipv4/tcp_ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ void tcp_unhash(struct sock *sk)
inet_unhash(&tcp_hashinfo, sk);
}

static inline __u32 tcp_v4_init_sequence(struct sock *sk, struct sk_buff *skb)
static inline __u32 tcp_v4_init_sequence(struct sk_buff *skb)
{
return secure_tcp_sequence_number(skb->nh.iph->daddr,
skb->nh.iph->saddr,
Expand Down Expand Up @@ -859,7 +859,7 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
goto drop_and_free;
}

isn = tcp_v4_init_sequence(sk, skb);
isn = tcp_v4_init_sequence(skb);
}
tcp_rsk(req)->snt_isn = isn;

Expand Down
19 changes: 6 additions & 13 deletions trunk/net/ipv6/tcp_ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,19 +106,12 @@ static __inline__ u16 tcp_v6_check(struct tcphdr *th, int len,
return csum_ipv6_magic(saddr, daddr, len, IPPROTO_TCP, base);
}

static __u32 tcp_v6_init_sequence(struct sock *sk, struct sk_buff *skb)
static __u32 tcp_v6_init_sequence(struct sk_buff *skb)
{
if (skb->protocol == htons(ETH_P_IPV6)) {
return secure_tcpv6_sequence_number(skb->nh.ipv6h->daddr.s6_addr32,
skb->nh.ipv6h->saddr.s6_addr32,
skb->h.th->dest,
skb->h.th->source);
} else {
return secure_tcp_sequence_number(skb->nh.iph->daddr,
skb->nh.iph->saddr,
skb->h.th->dest,
skb->h.th->source);
}
return secure_tcpv6_sequence_number(skb->nh.ipv6h->daddr.s6_addr32,
skb->nh.ipv6h->saddr.s6_addr32,
skb->h.th->dest,
skb->h.th->source);
}

static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr,
Expand Down Expand Up @@ -822,7 +815,7 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
treq->iif = inet6_iif(skb);

if (isn == 0)
isn = tcp_v6_init_sequence(sk,skb);
isn = tcp_v6_init_sequence(skb);

tcp_rsk(req)->snt_isn = isn;

Expand Down

0 comments on commit f18e368

Please sign in to comment.