Add default_mtu() methods to blackhole dst_ops
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
David Miller
maintainerFrom: Roland Dreier <[email protected]>
Date: Mon, 31 Jan 2011 13:12:58 -0800
Quoted 9 lines
From: Roland Dreier <[email protected]>
When an IPSEC SA is still being set up,
__xfrm_lookup()will return-EREMOTEand soip_route_output_flow()will return a blackhole route. This can happen in a sndmsg call, and afterd33e455337ea("net: Abstract default MTU metric calculation behind an accessor.") this leads to a crash inip_append_data()because the blackholedst_opshave nodefault_mtu()method and sodst_mtu()calls a NULL pointer.
Quoted 8 lines
Fix this by adding
default_mtu()methods (that simply return 0, matching the old behavior) to the blackholedst_ops.The IPv4 part of this patch fixes a crash that I saw when using an IPSEC VPN; the IPv6 part is untested because I don't have an IPv6 VPN, but it looks to be needed as well.
Signed-off-by Roland Dreier <[email protected]>
Thanks so much for tracking this down and fixing it. I was going to look at your traces and report later today.
I'll apply this, thanks again Roland.