Shmulik Ladkani fedbb6b4ff ipv4: Fix ip_skb_dst_mtu to use the sk passed by ip_finish_output
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>
Reviewed-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-30 09:02:48 -04:00
..
2015-08-25 13:38:50 -07:00
2016-04-27 22:48:24 -04:00
2016-05-20 18:03:16 -04:00
2016-06-15 22:15:21 -07:00
2016-01-05 22:25:57 -05:00
2016-04-27 22:48:24 -04:00
2016-04-27 22:48:23 -04:00
2016-06-15 22:15:21 -07:00
2016-03-31 08:59:56 +02:00
2016-02-17 16:15:46 -05:00
2016-02-17 16:15:46 -05:00
2012-03-11 23:42:51 -07:00
2014-05-23 16:28:53 -04:00
2015-09-17 17:18:37 -07:00
2013-05-31 17:19:05 -07:00