From: Ulrich Weber Date: Fri, 5 Nov 2010 01:39:12 +0000 (+0000) Subject: xfrm: update flowi saddr in icmp_send if unset X-Git-Tag: firefly_0821_release~7613^2~3176^2~131 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7d98ffd8c2d1da6cec5d84eba42c4aa836a93f85;p=firefly-linux-kernel-4.4.55.git xfrm: update flowi saddr in icmp_send if unset otherwise xfrm_lookup will fail to find correct policy Signed-off-by: Ulrich Weber Signed-off-by: David S. Miller --- diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index 96bc7f9475a3..e5d1a44bcbdf 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c @@ -569,6 +569,9 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info) /* No need to clone since we're just using its address. */ rt2 = rt; + if (!fl.nl_u.ip4_u.saddr) + fl.nl_u.ip4_u.saddr = rt->rt_src; + err = xfrm_lookup(net, (struct dst_entry **)&rt, &fl, NULL, 0); switch (err) { case 0: