diff options
author | Alex Gartrell <agartrell@fb.com> | 2015-06-26 06:18:45 -0400 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2015-07-14 03:41:27 -0400 |
commit | 326bf17ea5d4f8f17b54cbf167b8cb504c606ee9 (patch) | |
tree | 246ceffaea4201eb2a9820da6a4a592d862b07b4 /net | |
parent | 484836ec2de24d9a7c6471f022b746d947698725 (diff) |
ipvs: fix ipv6 route unreach panic
Previously there was a trivial panic
unshare -n /bin/bash <<EOF
ip addr add dev lo face::1/128
ipvsadm -A -t [face::1]:15213
ipvsadm -a -t [face::1]:15213 -r b00c::1
echo boom | nc face::1 15213
EOF
This patch allows us to replicate the net logic above and simply capture
the skb_dst(skb)->dev and use that for the purpose of the invocation.
Signed-off-by: Alex Gartrell <agartrell@fb.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/ipvs/ip_vs_xmit.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/netfilter/ipvs/ip_vs_xmit.c b/net/netfilter/ipvs/ip_vs_xmit.c index bf66a8657a5f..b99d80695b1f 100644 --- a/net/netfilter/ipvs/ip_vs_xmit.c +++ b/net/netfilter/ipvs/ip_vs_xmit.c | |||
@@ -505,6 +505,13 @@ err_put: | |||
505 | return -1; | 505 | return -1; |
506 | 506 | ||
507 | err_unreach: | 507 | err_unreach: |
508 | /* The ip6_link_failure function requires the dev field to be set | ||
509 | * in order to get the net (further for the sake of fwmark | ||
510 | * reflection). | ||
511 | */ | ||
512 | if (!skb->dev) | ||
513 | skb->dev = skb_dst(skb)->dev; | ||
514 | |||
508 | dst_link_failure(skb); | 515 | dst_link_failure(skb); |
509 | return -1; | 516 | return -1; |
510 | } | 517 | } |