net: don't call update_pmtu unconditionally
Some dst_ops (e.g. md_dst_ops)) doesn't set this handler. It may result to: "BUG: unable to handle kernel NULL pointer dereference at (null)" Let's add a helper to check if update_pmtu is available before calling it. Fixes: 52a589d5 ("geneve: update skb dst pmtu on tx path") Fixes: a93bf0ff ("vxlan: update skb dst pmtu on tx path") CC: Roman Kapl <code@rkapl.cz> CC: Xin Long <lucien.xin@gmail.com> Signed-off-by:Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- drivers/infiniband/ulp/ipoib/ipoib_cm.c 1 addition, 2 deletionsdrivers/infiniband/ulp/ipoib/ipoib_cm.c
- drivers/net/geneve.c 2 additions, 2 deletionsdrivers/net/geneve.c
- drivers/net/vxlan.c 2 additions, 4 deletionsdrivers/net/vxlan.c
- include/net/dst.h 8 additions, 0 deletionsinclude/net/dst.h
- net/ipv4/ip_tunnel.c 1 addition, 2 deletionsnet/ipv4/ip_tunnel.c
- net/ipv4/ip_vti.c 1 addition, 1 deletionnet/ipv4/ip_vti.c
- net/ipv6/ip6_tunnel.c 2 additions, 4 deletionsnet/ipv6/ip6_tunnel.c
- net/ipv6/ip6_vti.c 1 addition, 1 deletionnet/ipv6/ip6_vti.c
- net/ipv6/sit.c 2 additions, 2 deletionsnet/ipv6/sit.c
Loading
Please register or sign in to comment