LVS
lvs-devel
Google
 
Web LinuxVirtualServer.org

Re: [PATCH net-next] ipvs: fix ipv6 route unreach panic

To: Alex Gartrell <agartrell@xxxxxx>
Subject: Re: [PATCH net-next] ipvs: fix ipv6 route unreach panic
Cc: Simon Horman <horms@xxxxxxxxxxxx>, lvs-devel@xxxxxxxxxxxxxxx, kernel-team@xxxxxx
From: Julian Anastasov <ja@xxxxxx>
Date: Sat, 27 Jun 2015 14:35:00 +0300 (EEST)
        Hello,

On Fri, 26 Jun 2015, Alex Gartrell wrote:

> 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@xxxxxx>

        Looks good to me, thanks! Simon, patch looks suitable
for ipvs (net) tree.

Acked-by: Julian Anastasov <ja@xxxxxx>

> ---
>  net/netfilter/ipvs/ip_vs_xmit.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/net/netfilter/ipvs/ip_vs_xmit.c b/net/netfilter/ipvs/ip_vs_xmit.c
> index bf66a86..b99d806 100644
> --- a/net/netfilter/ipvs/ip_vs_xmit.c
> +++ b/net/netfilter/ipvs/ip_vs_xmit.c
> @@ -505,6 +505,13 @@ err_put:
>       return -1;
>  
>  err_unreach:
> +     /* The ip6_link_failure function requires the dev field to be set
> +      * in order to get the net (further for the sake of fwmark
> +      * reflection).
> +      */
> +     if (!skb->dev)
> +             skb->dev = skb_dst(skb)->dev;
> +
>       dst_link_failure(skb);
>       return -1;
>  }
> -- 
> Alex Gartrell <agartrell@xxxxxx>

Regards

--
Julian Anastasov <ja@xxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

<Prev in Thread] Current Thread [Next in Thread>