diff options
author | Ulrich Weber <uweber@astaro.com> | 2010-11-04 21:39:12 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-16 14:43:39 -0500 |
commit | 7d98ffd8c2d1da6cec5d84eba42c4aa836a93f85 (patch) | |
tree | 398437e234367d8184bbaed1b3af8dc8ed7d5d3a /net/ipv4/icmp.c | |
parent | 4c62ab9c538bc09c38093fa079e6902ea4d42b98 (diff) |
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>
Diffstat (limited to 'net/ipv4/icmp.c')
-rw-r--r-- | net/ipv4/icmp.c | 3 |
1 files changed, 3 insertions, 0 deletions
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) | |||
569 | /* No need to clone since we're just using its address. */ | 569 | /* No need to clone since we're just using its address. */ |
570 | rt2 = rt; | 570 | rt2 = rt; |
571 | 571 | ||
572 | if (!fl.nl_u.ip4_u.saddr) | ||
573 | fl.nl_u.ip4_u.saddr = rt->rt_src; | ||
574 | |||
572 | err = xfrm_lookup(net, (struct dst_entry **)&rt, &fl, NULL, 0); | 575 | err = xfrm_lookup(net, (struct dst_entry **)&rt, &fl, NULL, 0); |
573 | switch (err) { | 576 | switch (err) { |
574 | case 0: | 577 | case 0: |