linux-sctp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacek Szafraniec <jacek.szafraniec@nokia.com>
To: linux-sctp@vger.kernel.org
Cc: Jacek Szafraniec <jacek.szafraniec@nokia.com>,
	Vlad Yasevich <vyasevich@gmail.com>,
	Neil Horman <nhorman@tuxdriver.com>,
	Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Alexander Sverdlin <alexander.sverdlin@nokia.com>,
	Maciej Kwiecien <maciej.kwiecien@nokia.com>
Subject: [PATCH 1/1] sctp: do not update t->pathmtu when PMTUD is disabled
Date: Fri, 16 Jul 2021 09:16:00 +0200	[thread overview]
Message-ID: <20210716071600.53150-2-jacek.szafraniec@nokia.com> (raw)
In-Reply-To: <20210716071600.53150-1-jacek.szafraniec@nokia.com>

Transport pathmtu can not be updated, when PMTUD is disabled
and pathmtu is condigured as fixed. Unconditional update t->pathmtu
will result in overwriting parameter configured by user
and lack of GSO usage.

Signed-off-by: Jacek Szafraniec <jacek.szafraniec@nokia.com>
---
 include/net/sctp/sctp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index 2c6570e..0569956 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -612,7 +612,7 @@ static inline bool sctp_transport_pmtu_check(struct sctp_transport *t)
 {
 	__u32 pmtu = sctp_dst_mtu(t->dst);
 
-	if (t->pathmtu == pmtu)
+	if (t->pathmtu == pmtu || t->param_flags & SPP_PMTUD_DISABLE)
 		return true;
 
 	t->pathmtu = pmtu;
-- 
2.10.2


  reply	other threads:[~2021-07-16  7:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-16  7:15 [PATCH 0/1] sctp: do not update t->pathmtu when PMTUD is disabled Jacek Szafraniec
2021-07-16  7:16 ` Jacek Szafraniec [this message]
2021-07-16 17:13   ` [PATCH 1/1] " Xin Long
2021-07-19 10:14     ` [PATCH v2 " Jacek Szafraniec

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=20210716071600.53150-2-jacek.szafraniec@nokia.com \
    --to=jacek.szafraniec@nokia.com \
    --cc=alexander.sverdlin@nokia.com \
    --cc=davem@davemloft.net \
    --cc=linux-sctp@vger.kernel.org \
    --cc=maciej.kwiecien@nokia.com \
    --cc=marcelo.leitner@gmail.com \
    --cc=nhorman@tuxdriver.com \
    --cc=vyasevich@gmail.com \
    /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 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).