From: David Miller <davem@davemloft.net>
To: shmulik.ladkani@gmail.com
Cc: hannes@redhat.com, tom@herbertland.com, azhou@ovn.org,
stephen@networkplumber.org, netdev@vger.kernel.org
Subject: Re: [PATCH] ipv4: Fix ip_skb_dst_mtu to use the sk passed by ip_finish_output
Date: Thu, 30 Jun 2016 09:03:15 -0400 (EDT) [thread overview]
Message-ID: <20160630.090315.592285556929128713.davem@davemloft.net> (raw)
In-Reply-To: <1467226023-4168-1-git-send-email-shmulik.ladkani@gmail.com>
From: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Date: Wed, 29 Jun 2016 21:47:03 +0300
> ip_skb_dst_mtu uses skb->sk, assuming it is an AF_INET socket (e.g. it
> calls ip_sk_use_pmtu which casts sk as an inet_sk).
>
> However, in the case of UDP tunneling, the skb->sk is not necessarily an
> inet socket (could be AF_PACKET socket, or AF_UNSPEC if arriving from
> tun/tap).
>
> OTOH, the sk passed as an argument throughout IP stack's output path is
> the one which is of PMTU interest:
> - In case of local sockets, sk is same as skb->sk;
> - In case of a udp tunnel, sk is the tunneling socket.
>
> Fix, by passing ip_finish_output's sk to ip_skb_dst_mtu.
> This augments 7026b1ddb6 'netfilter: Pass socket pointer down through okfn().'
>
> Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Applied, thanks.
prev parent reply other threads:[~2016-06-30 13:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-29 18:47 [PATCH] ipv4: Fix ip_skb_dst_mtu to use the sk passed by ip_finish_output Shmulik Ladkani
2016-06-29 21:42 ` Hannes Frederic Sowa
2016-06-30 13:03 ` David Miller [this message]
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=20160630.090315.592285556929128713.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=azhou@ovn.org \
--cc=hannes@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=shmulik.ladkani@gmail.com \
--cc=stephen@networkplumber.org \
--cc=tom@herbertland.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).