netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sctp: list pmtudisc initizlisation for ipv4 sctp socket
@ 2008-07-24 15:46 Pavel Emelyanov
  2008-07-24 16:30 ` Vlad Yasevich
  0 siblings, 1 reply; 2+ messages in thread
From: Pavel Emelyanov @ 2008-07-24 15:46 UTC (permalink / raw)
  To: Vlad Yasevich; +Cc: linux-sctp, Linux Netdev List

I'm not sure whether this was done deliberately, but the
sctp_v4_create_accept_sk doesn't set the newinet->pmtudisc
like it is done in both cases (ipv4 and v6) for tcp sockets
and for sctp over ipv6 socket.

This loss is painless, I suppose, since the whole socket is
zeroed by default and thus this field is automatically set
to IP_PMTUDISC_DONT.

Restore this setting logic for sctp over ipv4 socket.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>

---

diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index a6e0818..b05c739 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -626,6 +626,11 @@ static struct sock *sctp_v4_create_accept_sk(struct sock *sk,
 	newinet->mc_index = 0;
 	newinet->mc_list = NULL;
 
+	if (ipv4_config.no_pmtu_disc)
+		newinet->pmtudisc = IP_PMTUDISC_DONT;
+	else
+		newinet->pmtudisc = IP_PMTUDISC_WANT;
+
 	sk_refcnt_debug_inc(newsk);
 
 	if (newsk->sk_prot->init(newsk)) {

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-07-24 16:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-24 15:46 [PATCH] sctp: list pmtudisc initizlisation for ipv4 sctp socket Pavel Emelyanov
2008-07-24 16:30 ` Vlad Yasevich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).