Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7d98ffd8 authored by Ulrich Weber's avatar Ulrich Weber Committed by David S. Miller
Browse files

xfrm: update flowi saddr in icmp_send if unset



otherwise xfrm_lookup will fail to find correct policy

Signed-off-by: default avatarUlrich Weber <uweber@astaro.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4c62ab9c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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: