From: Simon Horman <horms@verge.net.au>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: lvs-devel@vger.kernel.org, netdev@vger.kernel.org,
netfilter-devel@vger.kernel.org,
Wensong Zhang <wensong@linux-vs.org>,
Julian Anastasov <ja@ssi.bg>, Alex Gartrell <agartrell@fb.com>,
Simon Horman <horms@verge.net.au>
Subject: [PATCH 04/15] ipvs: Pass destination address family to ip_vs_trash_get_dest
Date: Thu, 18 Sep 2014 09:25:50 +0900 [thread overview]
Message-ID: <1410999961-7975-5-git-send-email-horms@verge.net.au> (raw)
In-Reply-To: <1410999961-7975-1-git-send-email-horms@verge.net.au>
From: Alex Gartrell <agartrell@fb.com>
Part of a series of diffs to tease out destination family from virtual
family. This diff just adds a parameter to ip_vs_trash_get and then uses
it for comparison rather than svc->af.
Signed-off-by: Alex Gartrell <agartrell@fb.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
net/netfilter/ipvs/ip_vs_ctl.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
index c840d89..6bd2cc6 100644
--- a/net/netfilter/ipvs/ip_vs_ctl.c
+++ b/net/netfilter/ipvs/ip_vs_ctl.c
@@ -657,8 +657,8 @@ static void __ip_vs_dst_cache_reset(struct ip_vs_dest *dest)
* scheduling.
*/
static struct ip_vs_dest *
-ip_vs_trash_get_dest(struct ip_vs_service *svc, const union nf_inet_addr *daddr,
- __be16 dport)
+ip_vs_trash_get_dest(struct ip_vs_service *svc, int dest_af,
+ const union nf_inet_addr *daddr, __be16 dport)
{
struct ip_vs_dest *dest;
struct netns_ipvs *ipvs = net_ipvs(svc->net);
@@ -671,11 +671,11 @@ ip_vs_trash_get_dest(struct ip_vs_service *svc, const union nf_inet_addr *daddr,
IP_VS_DBG_BUF(3, "Destination %u/%s:%u still in trash, "
"dest->refcnt=%d\n",
dest->vfwmark,
- IP_VS_DBG_ADDR(svc->af, &dest->addr),
+ IP_VS_DBG_ADDR(dest->af, &dest->addr),
ntohs(dest->port),
atomic_read(&dest->refcnt));
- if (dest->af == svc->af &&
- ip_vs_addr_equal(svc->af, &dest->addr, daddr) &&
+ if (dest->af == dest_af &&
+ ip_vs_addr_equal(dest_af, &dest->addr, daddr) &&
dest->port == dport &&
dest->vfwmark == svc->fwmark &&
dest->protocol == svc->protocol &&
@@ -950,7 +950,7 @@ ip_vs_add_dest(struct ip_vs_service *svc, struct ip_vs_dest_user_kern *udest)
* Check if the dest already exists in the trash and
* is from the same service
*/
- dest = ip_vs_trash_get_dest(svc, &daddr, dport);
+ dest = ip_vs_trash_get_dest(svc, udest->af, &daddr, dport);
if (dest != NULL) {
IP_VS_DBG_BUF(3, "Get destination %s:%u from trash, "
--
2.0.1
next prev parent reply other threads:[~2014-09-18 0:25 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-18 0:25 [GIT PULL v2 00/15] Second Round of IPVS Updates for v3.18 Simon Horman
2014-09-18 0:25 ` [PATCH 01/15] ipvs: Add simple weighted failover scheduler Simon Horman
2014-09-18 0:25 ` [PATCH 02/15] ipvs: Add destination address family to netlink interface Simon Horman
2014-09-18 0:25 ` [PATCH 03/15] ipvs: Supply destination addr family to ip_vs_{lookup_dest,find_dest} Simon Horman
2014-09-18 0:25 ` Simon Horman [this message]
2014-09-18 0:25 ` [PATCH 05/15] ipvs: Supply destination address family to ip_vs_conn_new Simon Horman
2014-09-18 0:25 ` [PATCH 06/15] ipvs: prevent mixing heterogeneous pools and synchronization Simon Horman
2014-09-18 0:25 ` [PATCH 07/15] ipvs: Pull out crosses_local_route_boundary logic Simon Horman
2014-09-18 0:25 ` [PATCH 08/15] ipvs: Pull out update_pmtu code Simon Horman
2014-09-18 0:25 ` [PATCH 09/15] ipvs: Add generic ensure_mtu_is_adequate to handle mixed pools Simon Horman
2014-09-18 0:25 ` [PATCH 10/15] ipvs: support ipv4 in ipv6 and ipv6 in ipv4 tunnel forwarding Simon Horman
2014-09-18 0:25 ` [PATCH 11/15] ipvs: address family of LBLC entry depends on svc family Simon Horman
2014-09-18 0:25 ` [PATCH 12/15] ipvs: address family of LBLCR " Simon Horman
2014-09-18 0:25 ` [PATCH 13/15] ipvs: use correct address family in scheduler logs Simon Horman
2014-09-18 0:26 ` [PATCH 14/15] ipvs: use the new dest addr family field Simon Horman
2014-09-18 0:26 ` [PATCH 15/15] ipvs: Allow heterogeneous pools now that we support them Simon Horman
2014-09-18 9:03 ` [GIT PULL v2 00/15] Second Round of IPVS Updates for v3.18 Pablo Neira Ayuso
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=1410999961-7975-5-git-send-email-horms@verge.net.au \
--to=horms@verge.net.au \
--cc=agartrell@fb.com \
--cc=ja@ssi.bg \
--cc=lvs-devel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--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).