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: <20120803.165611.1832423445730269834.davem@davemloft.net>
Date:	Fri, 03 Aug 2012 16:56:11 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	eric.dumazet@...il.com
Cc:	ebiederm@...ssion.com, xemul@...allels.com, netdev@...r.kernel.org
Subject: Re: [PATCH 1/2] net: Allow to create links with given ifindex

From: Eric Dumazet <eric.dumazet@...il.com>
Date: Fri, 03 Aug 2012 07:45:29 +0200

> @@ -1587,13 +1587,11 @@ static int ip_route_input_slow(struct sk_buff *skb, __be32 daddr, __be32 saddr,
>  	if (ipv4_is_zeronet(daddr))
>  		goto martian_destination;
>  
> -	if (likely(!IN_DEV_ROUTE_LOCALNET(in_dev))) {
> -		if (ipv4_is_loopback(daddr))
> -			goto martian_destination;
> +	if (ipv4_is_loopback(daddr) && !IN_DEV_NET_ROUTE_LOCALNET(in_dev, net))
> +		goto martian_destination;
>  
> -		if (ipv4_is_loopback(saddr))
> -			goto martian_source;
> -	}
> +	if (ipv4_is_loopback(saddr) && !IN_DEV_NET_ROUTE_LOCALNET(in_dev, net))
> +		goto martian_source;

Maybe clearer as:

	if ((ipv4_is_loopback(daddr) || ipv4_is_loopback(saddr)) &&
	    !IN_DEV_NET_ROUTE_LOCALNET(in_dev, net))
		goto martian_source;
--
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