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:	Tue, 16 Sep 2008 11:25:21 +0200 (CEST)
From:	Sven Wegener <sven.wegener@...aler.net>
To:	Simon Horman <horms@...ge.net.au>
cc:	lvs-devel@...r.kernel.org, netdev@...r.kernel.org,
	Julius Volz <juliusv@...gle.com>,
	Vince Busam <vbusam@...gle.com>,
	Wensong Zhang <wensong@...ux-vs.org>,
	Julian Anastasov <ja@....bg>
Subject: Re: [patch 2/3] ipvs: supply a valid 0 address to ip_vs_conn_new()

On Tue, 16 Sep 2008, Simon Horman wrote:

> ip_vs_conn_new expects a union nf_inet_addr as the type for its address
> parameters, not a plain integer.
> 
> This problem was detected by sparse.
> 
> make C=1
>   CHECK   net/ipv4/ipvs/ip_vs_core.c
> net/ipv4/ipvs/ip_vs_core.c:469:9: warning: Using plain integer as NULL pointer
> 
> Signed-off-by: Simon Horman <horms@...ge.net.au>
> 
> Index: lvs-2.6/net/ipv4/ipvs/ip_vs_core.c
> ===================================================================
> --- lvs-2.6.orig/net/ipv4/ipvs/ip_vs_core.c	2008-09-16 15:28:40.000000000 +1000
> +++ lvs-2.6/net/ipv4/ipvs/ip_vs_core.c	2008-09-16 15:28:47.000000000 +1000
> @@ -457,6 +457,7 @@ int ip_vs_leave(struct ip_vs_service *sv
>  	if (sysctl_ip_vs_cache_bypass && svc->fwmark && unicast) {
>  		int ret, cs;
>  		struct ip_vs_conn *cp;
> +		union nf_inet_addr daddr =  { .all = { 0, 0, 0, 0 } };

Could be static and const, to avoid allocation and initialization on the 
stack every time. But I don't think this a critical code path.

>  
>  		ip_vs_service_put(svc);
>  
> @@ -465,7 +466,7 @@ int ip_vs_leave(struct ip_vs_service *sv
>  		cp = ip_vs_conn_new(svc->af, iph.protocol,
>  				    &iph.saddr, pptr[0],
>  				    &iph.daddr, pptr[1],
> -				    0, 0,
> +				    &daddr, 0,
>  				    IP_VS_CONN_F_BYPASS,
>  				    NULL);
>  		if (cp == NULL)
--
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