aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ipvs/ip_vs_wlc.c
diff options
context:
space:
mode:
authorJulius Volz <juliusv@google.com>2008-09-02 09:55:39 -0400
committerSimon Horman <horms@verge.net.au>2008-09-04 21:17:06 -0400
commitb14198f6c1bea1687d20723db35d8effecd9d899 (patch)
treef521aa6fdaa6a70aa2240c6ac59321722a04a1c3 /net/ipv4/ipvs/ip_vs_wlc.c
parent3c2e0505d25cdc9425336f167fd4ff5f505aecff (diff)
IPVS: Add IPv6 support flag to schedulers
Add 'supports_ipv6' flag to struct ip_vs_scheduler to indicate whether a scheduler supports IPv6. Set the flag to 1 in schedulers that work with IPv6, 0 otherwise. This flag is checked in a later patch while trying to add a service with a specific scheduler. Adjust debug in v6-supporting schedulers to work with both address families. Signed-off-by: Julius Volz <juliusv@google.com> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'net/ipv4/ipvs/ip_vs_wlc.c')
-rw-r--r--net/ipv4/ipvs/ip_vs_wlc.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/net/ipv4/ipvs/ip_vs_wlc.c b/net/ipv4/ipvs/ip_vs_wlc.c
index 09fd993040f5..8c596e712599 100644
--- a/net/ipv4/ipvs/ip_vs_wlc.c
+++ b/net/ipv4/ipvs/ip_vs_wlc.c
@@ -89,12 +89,12 @@ ip_vs_wlc_schedule(struct ip_vs_service *svc, const struct sk_buff *skb)
89 } 89 }
90 } 90 }
91 91
92 IP_VS_DBG(6, "WLC: server %u.%u.%u.%u:%u " 92 IP_VS_DBG_BUF(6, "WLC: server %s:%u "
93 "activeconns %d refcnt %d weight %d overhead %d\n", 93 "activeconns %d refcnt %d weight %d overhead %d\n",
94 NIPQUAD(least->addr.ip), ntohs(least->port), 94 IP_VS_DBG_ADDR(svc->af, &least->addr), ntohs(least->port),
95 atomic_read(&least->activeconns), 95 atomic_read(&least->activeconns),
96 atomic_read(&least->refcnt), 96 atomic_read(&least->refcnt),
97 atomic_read(&least->weight), loh); 97 atomic_read(&least->weight), loh);
98 98
99 return least; 99 return least;
100} 100}
@@ -106,6 +106,9 @@ static struct ip_vs_scheduler ip_vs_wlc_scheduler =
106 .refcnt = ATOMIC_INIT(0), 106 .refcnt = ATOMIC_INIT(0),
107 .module = THIS_MODULE, 107 .module = THIS_MODULE,
108 .n_list = LIST_HEAD_INIT(ip_vs_wlc_scheduler.n_list), 108 .n_list = LIST_HEAD_INIT(ip_vs_wlc_scheduler.n_list),
109#ifdef CONFIG_IP_VS_IPV6
110 .supports_ipv6 = 1,
111#endif
109 .schedule = ip_vs_wlc_schedule, 112 .schedule = ip_vs_wlc_schedule,
110}; 113};
111 114