kernel_optimize_test/net/ipv4
Sabrina Dubroca 28d35bcdd3 net: ipv4: don't let PMTU updates increase route MTU
When an MTU update with PMTU smaller than net.ipv4.route.min_pmtu is
received, we must clamp its value. However, we can receive a PMTU
exception with PMTU < old_mtu < ip_rt_min_pmtu, which would lead to an
increase in PMTU.

To fix this, take the smallest of the old MTU and ip_rt_min_pmtu.

Before this patch, in case of an update, the exception's MTU would
always change. Now, an exception can have only its lock flag updated,
but not the MTU, so we need to add a check on locking to the following
"is this exception getting updated, or close to expiring?" test.

Fixes: d52e5a7e7c ("ipv4: lock mtu in fnhe when received PMTU < net.ipv4.route.min_pmtu")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-10 22:44:46 -07:00
..
bpfilter bpfilter: remove trailing newline 2018-07-24 14:10:42 -07:00
netfilter netfilter: kconfig: nat related expression depend on nftables core 2018-08-31 19:07:10 +02:00
af_inet.c gso_segment: Reset skb->mac_len after modifying network header 2018-09-13 12:09:32 -07:00
ah4.c
arp.c
cipso_ipv4.c
datagram.c
devinet.c route: add support for directed broadcast forwarding 2018-07-29 12:37:06 -07:00
esp4_offload.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next 2018-07-27 09:33:37 -07:00
esp4.c
fib_frontend.c net: ipv4: update fnhe_pmtu when first hop's MTU changes 2018-10-10 22:44:46 -07:00
fib_lookup.h
fib_notifier.c
fib_rules.c
fib_semantics.c net: ipv4: update fnhe_pmtu when first hop's MTU changes 2018-10-10 22:44:46 -07:00
fib_trie.c
fou.c
gre_demux.c
gre_offload.c
icmp.c
igmp.c igmp: fix incorrect unsolicit report count after link down and up 2018-09-02 13:39:37 -07:00
inet_connection_sock.c inet: make sure to grab rcu_read_lock before using ireq->ireq_opt 2018-10-02 15:52:12 -07:00
inet_diag.c
inet_fragment.c ip: process in-order fragments efficiently 2018-08-11 17:54:18 -07:00
inet_hashtables.c bpf: Enable BPF_PROG_TYPE_SK_REUSEPORT bpf prog in reuseport selection 2018-08-11 01:58:46 +02:00
inet_timewait_sock.c
inetpeer.c
ip_forward.c net: ipv4: Control SKB reprioritization after forwarding 2018-08-01 09:52:30 -07:00
ip_fragment.c ip: frags: fix crash in ip_do_fragment() 2018-09-09 14:50:56 -07:00
ip_gre.c erspan: fix error handling for erspan tunnel 2018-09-11 23:50:54 -07:00
ip_input.c
ip_options.c
ip_output.c Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net 2018-07-24 19:21:58 -07:00
ip_sockglue.c ipv4: fix use-after-free in ip_cmsg_recv_dstaddr() 2018-10-02 22:32:05 -07:00
ip_tunnel_core.c
ip_tunnel.c ip_tunnel: be careful when accessing the inner header 2018-09-24 12:27:04 -07:00
ip_vti.c ip_vti: fix a null pointer deferrence when create vti fallback tunnel 2018-08-19 11:26:39 -07:00
ipcomp.c
ipconfig.c
ipip.c
ipmr_base.c
ipmr.c
Kconfig net: remove blank lines at end of file 2018-07-24 14:10:43 -07:00
Makefile net: remove blank lines at end of file 2018-07-24 14:10:43 -07:00
metrics.c
netfilter.c
netlink.c
ping.c net: add helpers checking if socket can be bound to nonlocal address 2018-08-01 09:50:04 -07:00
proc.c ip: discard IPv4 datagrams with overlapping segments. 2018-08-05 17:16:46 -07:00
protocol.c
raw_diag.c
raw.c
route.c net: ipv4: don't let PMTU updates increase route MTU 2018-10-10 22:44:46 -07:00
syncookies.c
sysctl_net_ipv4.c net-tcp: /proc/sys/net/ipv4/tcp_probe_interval is a u32 not int 2018-09-26 20:33:21 -07:00
tcp_bbr.c tcp_bbr: apply PROBE_RTT cwnd cap even if acked==0 2018-08-22 21:45:32 -07:00
tcp_bic.c
tcp_cdg.c
tcp_cong.c
tcp_cubic.c
tcp_dctcp.c tcp: avoid resetting ACK timer in DCTCP 2018-08-11 11:31:35 -07:00
tcp_diag.c
tcp_fastopen.c
tcp_highspeed.c
tcp_htcp.c
tcp_hybla.c
tcp_illinois.c
tcp_input.c tcp/dccp: fix lockdep issue when SYN is backlogged 2018-10-01 15:42:13 -07:00
tcp_ipv4.c inet: make sure to grab rcu_read_lock before using ireq->ireq_opt 2018-10-02 15:52:12 -07:00
tcp_lp.c
tcp_metrics.c
tcp_minisocks.c tcp: do not restart timewait timer on rst reception 2018-08-31 23:10:35 -07:00
tcp_nv.c
tcp_offload.c
tcp_output.c tcp: remove set but not used variable 'skb_size' 2018-08-01 09:57:09 -07:00
tcp_rate.c
tcp_recovery.c tcp: add stat of data packet reordering events 2018-08-01 09:56:10 -07:00
tcp_scalable.c
tcp_timer.c tcp: make function tcp_retransmit_stamp() static 2018-07-25 16:35:45 -07:00
tcp_ulp.c tcp, ulp: fix leftover icsk_ulp_ops preventing sock from reattach 2018-08-16 14:58:08 -07:00
tcp_vegas.c
tcp_vegas.h
tcp_veno.c
tcp_westwood.c
tcp_yeah.c
tcp.c tcp: really ignore MSG_ZEROCOPY if no SO_ZEROCOPY 2018-09-07 23:11:06 -07:00
tunnel4.c
udp_diag.c
udp_impl.h
udp_offload.c
udp_tunnel.c
udp.c udp: Unbreak modules that rely on external __skb_recv_udp() availability 2018-10-07 20:33:10 -07:00
udplite.c
xfrm4_input.c xfrm: reset transport header back to network header after all input transforms ahave been applied 2018-09-04 10:26:30 +02:00
xfrm4_mode_beet.c
xfrm4_mode_transport.c xfrm: reset transport header back to network header after all input transforms ahave been applied 2018-09-04 10:26:30 +02:00
xfrm4_mode_tunnel.c
xfrm4_output.c
xfrm4_policy.c
xfrm4_protocol.c
xfrm4_state.c
xfrm4_tunnel.c