summaryrefslogtreecommitdiff
path: root/net/sctp/protocol.c
diff options
context:
space:
mode:
authorVlad Yasevich <vladislav.yasevich@hp.com>2006-10-30 18:54:32 -0800
committerDavid S. Miller <davem@davemloft.net>2006-10-30 18:54:32 -0800
commit4f4443088b763ca4ac7521e9b4a881b52c294dec (patch)
treea66cdaaafd6ad08e611a6533a8793ed4c9550ca3 /net/sctp/protocol.c
parentf8687afefcc821fc47c75775eec87731fe3de360 (diff)
downloadlwn-4f4443088b763ca4ac7521e9b4a881b52c294dec.tar.gz
lwn-4f4443088b763ca4ac7521e9b4a881b52c294dec.zip
[SCTP]: Correctly set IP id for SCTP traffic
Make SCTP 1-1 style and peeled-off associations behave like TCP when setting IP id. In both cases, we set the inet_sk(sk)->daddr and initialize inet_sk(sk)->id to a random value. Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: Sridhar Samudrala <sri@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/protocol.c')
-rw-r--r--net/sctp/protocol.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index fac7674438a4..5b4f82fd98f8 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -591,7 +591,7 @@ static struct sock *sctp_v4_create_accept_sk(struct sock *sk,
newinet->dport = htons(asoc->peer.port);
newinet->daddr = asoc->peer.primary_addr.v4.sin_addr.s_addr;
newinet->pmtudisc = inet->pmtudisc;
- newinet->id = 0;
+ newinet->id = asoc->next_tsn ^ jiffies;
newinet->uc_ttl = -1;
newinet->mc_loop = 1;