diff options
author | Julian Anastasov <ja@ssi.bg> | 2012-07-18 17:35:03 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-19 11:30:49 -0400 |
commit | 0cc535a29916c6a0e6e6af0f3d42c2fe3b0b145d (patch) | |
tree | 28be5b939062368de3001e4602cede3a0727b07a | |
parent | 6255e5ead00cf96554f623ba51e2ac4c8ac27276 (diff) |
ipv4: fix address selection in fib_compute_spec_dst
ip_options_compile can be called for forwarded packets,
make sure the specific-destionation address is a local one as
specified in RFC 1812, 4.2.2.2 Addresses in Options
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv4/fib_frontend.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index 7a31194ec633..b83203658ee3 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c | |||
@@ -206,7 +206,8 @@ __be32 fib_compute_spec_dst(struct sk_buff *skb) | |||
206 | int scope; | 206 | int scope; |
207 | 207 | ||
208 | rt = skb_rtable(skb); | 208 | rt = skb_rtable(skb); |
209 | if (!(rt->rt_flags & (RTCF_BROADCAST | RTCF_MULTICAST))) | 209 | if ((rt->rt_flags & (RTCF_BROADCAST | RTCF_MULTICAST | RTCF_LOCAL)) == |
210 | RTCF_LOCAL) | ||
210 | return ip_hdr(skb)->daddr; | 211 | return ip_hdr(skb)->daddr; |
211 | 212 | ||
212 | in_dev = __in_dev_get_rcu(dev); | 213 | in_dev = __in_dev_get_rcu(dev); |