xfrm: update flowi saddr in icmp_send if unset
otherwise xfrm_lookup will fail to find correct policy Signed-off-by: Ulrich Weber <uweber@astaro.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
4c62ab9c53
commit
7d98ffd8c2
@@ -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. */
|
/* No need to clone since we're just using its address. */
|
||||||
rt2 = rt;
|
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);
|
err = xfrm_lookup(net, (struct dst_entry **)&rt, &fl, NULL, 0);
|
||||||
switch (err) {
|
switch (err) {
|
||||||
case 0:
|
case 0:
|
||||||
|
Reference in New Issue
Block a user