Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41643
b: refs/heads/master
c: 865e902
h: refs/heads/master
i:
  41641: e2c6da9
  41639: eff85fc
v: v3
  • Loading branch information
Gerrit Renker authored and David S. Miller committed Dec 3, 2006
1 parent 5edc408 commit c8e7919
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 18 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: 4ed800d02cfb639b4f8375a0f0f04f0efea64e7f
refs/heads/master: 865e9022d88ceedd89fa1079a6e1f9266ccd3711
5 changes: 2 additions & 3 deletions trunk/net/dccp/ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,7 @@ void dccp_v4_send_check(struct sock *sk, int unused, struct sk_buff *skb)

EXPORT_SYMBOL_GPL(dccp_v4_send_check);

static inline u64 dccp_v4_init_sequence(const struct sock *sk,
const struct sk_buff *skb)
static inline u64 dccp_v4_init_sequence(const struct sk_buff *skb)
{
return secure_dccp_sequence_number(skb->nh.iph->daddr,
skb->nh.iph->saddr,
Expand Down Expand Up @@ -663,7 +662,7 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
*/
dreq = dccp_rsk(req);
dreq->dreq_isr = dcb->dccpd_seq;
dreq->dreq_iss = dccp_v4_init_sequence(sk, skb);
dreq->dreq_iss = dccp_v4_init_sequence(skb);
dreq->dreq_service = service;

if (dccp_v4_send_response(sk, req, NULL))
Expand Down
20 changes: 6 additions & 14 deletions trunk/net/dccp/ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,12 @@ static inline void dccp_v6_send_check(struct sock *sk, int unused_value,
dh->dccph_checksum = dccp_v6_csum_finish(skb, &np->saddr, &np->daddr);
}

static __u32 dccp_v6_init_sequence(struct sock *sk, struct sk_buff *skb)
static inline __u32 dccp_v6_init_sequence(const struct sk_buff *skb)
{
const struct dccp_hdr *dh = dccp_hdr(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,
dh->dccph_dport,
dh->dccph_sport);

return secure_dccp_sequence_number(skb->nh.iph->daddr,
skb->nh.iph->saddr,
dh->dccph_dport,
dh->dccph_sport);
return secure_tcpv6_sequence_number(skb->nh.ipv6h->daddr.s6_addr32,
skb->nh.ipv6h->saddr.s6_addr32,
dccp_hdr(skb)->dccph_dport,
dccp_hdr(skb)->dccph_sport );
}

static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
Expand Down Expand Up @@ -491,7 +483,7 @@ static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
*/
dreq = dccp_rsk(req);
dreq->dreq_isr = dcb->dccpd_seq;
dreq->dreq_iss = dccp_v6_init_sequence(sk, skb);
dreq->dreq_iss = dccp_v6_init_sequence(skb);
dreq->dreq_service = service;

if (dccp_v6_send_response(sk, req, NULL))
Expand Down

0 comments on commit c8e7919

Please sign in to comment.