lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.21.1909302146530.2706@ja.home.ssi.bg>
Date:   Mon, 30 Sep 2019 21:49:38 +0300 (EEST)
From:   Julian Anastasov <ja@....bg>
To:     zhang kai <zhangkaiheb@....com>
cc:     Wensong Zhang <wensong@...ux-vs.org>,
        Simon Horman <horms@...ge.net.au>, lvs-devel@...r.kernel.org,
        netdev@...r.kernel.org, netfilter-devel@...r.kernel.org
Subject: Re: [PATCH] ipvs: no need to update skb route entry for local
 destination packets.


	Hello,

On Mon, 30 Sep 2019, zhang kai wrote:

> In the end of function __ip_vs_get_out_rt/__ip_vs_get_out_rt_v6,the
> 'local' variable is always zero.
> 
> Signed-off-by: zhang kai <zhangkaiheb@....com>

	Looks good to me, thanks!

Acked-by: Julian Anastasov <ja@....bg>

	Simon, this is for -next kernels...

> ---
>  net/netfilter/ipvs/ip_vs_xmit.c | 18 ++++++------------
>  1 file changed, 6 insertions(+), 12 deletions(-)
> 
> diff --git a/net/netfilter/ipvs/ip_vs_xmit.c b/net/netfilter/ipvs/ip_vs_xmit.c
> index 9c464d24beec..037c7c91044e 100644
> --- a/net/netfilter/ipvs/ip_vs_xmit.c
> +++ b/net/netfilter/ipvs/ip_vs_xmit.c
> @@ -407,12 +407,9 @@ __ip_vs_get_out_rt(struct netns_ipvs *ipvs, int skb_af, struct sk_buff *skb,
>  		goto err_put;
>  
>  	skb_dst_drop(skb);
> -	if (noref) {
> -		if (!local)
> -			skb_dst_set_noref(skb, &rt->dst);
> -		else
> -			skb_dst_set(skb, dst_clone(&rt->dst));
> -	} else
> +	if (noref)
> +		skb_dst_set_noref(skb, &rt->dst);
> +	else
>  		skb_dst_set(skb, &rt->dst);
>  
>  	return local;
> @@ -574,12 +571,9 @@ __ip_vs_get_out_rt_v6(struct netns_ipvs *ipvs, int skb_af, struct sk_buff *skb,
>  		goto err_put;
>  
>  	skb_dst_drop(skb);
> -	if (noref) {
> -		if (!local)
> -			skb_dst_set_noref(skb, &rt->dst);
> -		else
> -			skb_dst_set(skb, dst_clone(&rt->dst));
> -	} else
> +	if (noref)
> +		skb_dst_set_noref(skb, &rt->dst);
> +	else
>  		skb_dst_set(skb, &rt->dst);
>  
>  	return local;
> -- 
> 2.17.1

Regards

--
Julian Anastasov <ja@....bg>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ