All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vlad Yasevich <vladislav.yasevich@hp.com>
To: Pavel Emelyanov <xemul@openvz.org>
Cc: linux-sctp@vger.kernel.org, Linux Netdev List <netdev@vger.kernel.org>
Subject: Re: [PATCH] sctp: list pmtudisc initizlisation for ipv4 sctp socket
Date: Thu, 24 Jul 2008 16:30:48 +0000	[thread overview]
Message-ID: <4888AE38.7020208@hp.com> (raw)
In-Reply-To: <4888A3C9.3010203@openvz.org>

Pavel Emelyanov wrote:
> 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)) {

Hi Pavel

We already inherit the settings from the parent socket here:

        newinet->daddr = asoc->peer.primary_addr.v4.sin_addr.s_addr;
        newinet->pmtudisc = inet->pmtudisc;
        newinet->id = asoc->next_tsn ^ jiffies;

So NACK.

-vlad

WARNING: multiple messages have this Message-ID (diff)
From: Vlad Yasevich <vladislav.yasevich@hp.com>
To: Pavel Emelyanov <xemul@openvz.org>
Cc: linux-sctp@vger.kernel.org, Linux Netdev List <netdev@vger.kernel.org>
Subject: Re: [PATCH] sctp: list pmtudisc initizlisation for ipv4 sctp socket
Date: Thu, 24 Jul 2008 12:30:48 -0400	[thread overview]
Message-ID: <4888AE38.7020208@hp.com> (raw)
In-Reply-To: <4888A3C9.3010203@openvz.org>

Pavel Emelyanov wrote:
> 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)) {

Hi Pavel

We already inherit the settings from the parent socket here:

        newinet->daddr = asoc->peer.primary_addr.v4.sin_addr.s_addr;
        newinet->pmtudisc = inet->pmtudisc;
        newinet->id = asoc->next_tsn ^ jiffies;

So NACK.

-vlad

  reply	other threads:[~2008-07-24 16:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-24 15:46 [PATCH] sctp: list pmtudisc initizlisation for ipv4 sctp socket Pavel Emelyanov
2008-07-24 15:46 ` Pavel Emelyanov
2008-07-24 16:30 ` Vlad Yasevich [this message]
2008-07-24 16:30   ` Vlad Yasevich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4888AE38.7020208@hp.com \
    --to=vladislav.yasevich@hp.com \
    --cc=linux-sctp@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=xemul@openvz.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.