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]
Date:	Fri, 29 Mar 2013 18:44:06 +0400
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Simon Horman <horms@...ge.net.au>
CC:	Pablo Neira Ayuso <pablo@...filter.org>, lvs-devel@...r.kernel.org,
	netdev@...r.kernel.org, netfilter-devel@...r.kernel.org,
	Wensong Zhang <wensong@...ux-vs.org>,
	Julian Anastasov <ja@....bg>
Subject: Re: [PATCH 06/34] ipvs: no need to reroute anymore on DNAT over loopback

Hello.

On 29-03-2013 8:11, Simon Horman wrote:

> From: Julian Anastasov <ja@....bg>

> After commit 70e7341673 (ipv4: Show that ip_send_reply()
> is purely unicast routine.) we do not need to reroute DNAT-ed
> traffic over loopback because reply uses iph daddr and not
> rt_spec_dst.

> Signed-off-by: Julian Anastasov <ja@....bg>
> Signed-off by: Hans Schillstrom <hans@...illstrom.com>
> Signed-off-by: Simon Horman <horms@...ge.net.au>
> ---
>   net/netfilter/ipvs/ip_vs_xmit.c |   58 ++-------------------------------------
>   1 file changed, 2 insertions(+), 56 deletions(-)

> diff --git a/net/netfilter/ipvs/ip_vs_xmit.c b/net/netfilter/ipvs/ip_vs_xmit.c
> index 6448a2e..c942d36 100644
> --- a/net/netfilter/ipvs/ip_vs_xmit.c
> +++ b/net/netfilter/ipvs/ip_vs_xmit.c
[...]
> @@ -635,16 +597,8 @@ ip_vs_nat_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
>   		/* drop old route */
>   		skb_dst_drop(skb);
>   		skb_dst_set(skb, &rt->dst);
> -	} else {
> +	} else

    {} should be kept after *else*, according to Documentation/CodingStyle, 
chapter 3.

>   		ip_rt_put(rt);
> -		/*
> -		 * Some IPv4 replies get local address from routes,
> -		 * not from iph, so while we DNAT after routing
> -		 * we need this second input/output route.
> -		 */
> -		if (!__ip_vs_reroute_locally(skb))
> -			goto tx_error;
> -	}
>
>   	IP_VS_DBG_PKT(10, AF_INET, pp, skb, 0, "After DNAT");
>
> @@ -1269,16 +1223,8 @@ ip_vs_icmp_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
>   		/* drop the old route when skb is not shared */
>   		skb_dst_drop(skb);
>   		skb_dst_set(skb, &rt->dst);
> -	} else {
> +	} else

    Same here.

>   		ip_rt_put(rt);
> -		/*
> -		 * Some IPv4 replies get local address from routes,
> -		 * not from iph, so while we DNAT after routing
> -		 * we need this second input/output route.
> -		 */
> -		if (!__ip_vs_reroute_locally(skb))
> -			goto tx_error;
> -	}
>
>   	/* Another hack: avoid icmp_send in ip_fragment */
>   	skb->local_df = 1;
>

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ