From: Simon Horman <horms@verge.net.au>
To: lvs-devel@vger.kernel.org, netdev@vger.kernel.org
Cc: Julius Volz <juliusv@google.com>, Vince Busam <vbusam@google.com>,
Wensong Zhang <wensong@linux-vs.org>,
Julian Anastasov <ja@ssi.bg>,
Sven Wegener <sven.wegener@stealer.net>
Subject: [patch 2/3] ipvs: supply a valid 0 address to ip_vs_conn_new()
Date: Tue, 16 Sep 2008 17:13:20 +1000 [thread overview]
Message-ID: <20080916071610.570391582@vergenet.net> (raw)
In-Reply-To: 20080916071318.939200044@vergenet.net
[-- Attachment #1: null-daddr.patch --]
[-- Type: text/plain, Size: 1261 bytes --]
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@verge.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 } };
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)
--
--
Simon Horman
VA Linux Systems Japan K.K., Sydney, Australia Satellite Office
H: www.vergenet.net/~horms/ W: www.valinux.co.jp/en
next prev parent reply other threads:[~2008-09-16 7:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-16 7:13 [patch 0/3] ipvs: sparse fixes Simon Horman
2008-09-16 7:13 ` [patch 1/3] ipvs: only unlock in ip_vs_edit_service() if already locked Simon Horman
2008-09-20 9:48 ` [PATCH] ipvs: Fix unused label warning Sven Wegener
2008-09-21 23:57 ` Simon Horman
2008-09-16 7:13 ` Simon Horman [this message]
2008-09-16 9:25 ` [patch 2/3] ipvs: supply a valid 0 address to ip_vs_conn_new() Sven Wegener
2008-09-16 10:25 ` Simon Horman
2008-09-16 7:13 ` [patch 3/3] ipvs: add __aquire/__release annotations to ip_vs_info_seq_start/ip_vs_info_seq_stop Simon Horman
2008-09-16 9:28 ` [patch 0/3] ipvs: sparse fixes Sven Wegener
2008-09-16 11:01 ` Julius Volz
2008-09-17 0:15 ` Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080916071610.570391582@vergenet.net \
--to=horms@verge.net.au \
--cc=ja@ssi.bg \
--cc=juliusv@google.com \
--cc=lvs-devel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sven.wegener@stealer.net \
--cc=vbusam@google.com \
--cc=wensong@linux-vs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).