diff options
author | Julian Anastasov <ja@ssi.bg> | 2014-09-16 17:09:00 -0400 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2014-09-17 19:59:23 -0400 |
commit | 4d316f3f9ae3d5fad8d3198eec0a4ef2511471d7 (patch) | |
tree | b48f8aabd414ca9e5a9032098422afe17a1b9083 /net/netfilter | |
parent | cf34e646dad101170e00712fe51986cbcdad3044 (diff) |
ipvs: use correct address family in scheduler logs
Needed to support svc->af != dest->af.
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Alex Gartrell <agartrell@fb.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'net/netfilter')
-rw-r--r-- | net/netfilter/ipvs/ip_vs_dh.c | 2 | ||||
-rw-r--r-- | net/netfilter/ipvs/ip_vs_fo.c | 2 | ||||
-rw-r--r-- | net/netfilter/ipvs/ip_vs_lc.c | 2 | ||||
-rw-r--r-- | net/netfilter/ipvs/ip_vs_nq.c | 3 | ||||
-rw-r--r-- | net/netfilter/ipvs/ip_vs_rr.c | 2 | ||||
-rw-r--r-- | net/netfilter/ipvs/ip_vs_sed.c | 3 | ||||
-rw-r--r-- | net/netfilter/ipvs/ip_vs_sh.c | 8 | ||||
-rw-r--r-- | net/netfilter/ipvs/ip_vs_wlc.c | 3 | ||||
-rw-r--r-- | net/netfilter/ipvs/ip_vs_wrr.c | 2 |
9 files changed, 15 insertions, 12 deletions
diff --git a/net/netfilter/ipvs/ip_vs_dh.c b/net/netfilter/ipvs/ip_vs_dh.c index c3b84546ea9e..6be5c538b71e 100644 --- a/net/netfilter/ipvs/ip_vs_dh.c +++ b/net/netfilter/ipvs/ip_vs_dh.c | |||
@@ -234,7 +234,7 @@ ip_vs_dh_schedule(struct ip_vs_service *svc, const struct sk_buff *skb, | |||
234 | 234 | ||
235 | IP_VS_DBG_BUF(6, "DH: destination IP address %s --> server %s:%d\n", | 235 | IP_VS_DBG_BUF(6, "DH: destination IP address %s --> server %s:%d\n", |
236 | IP_VS_DBG_ADDR(svc->af, &iph->daddr), | 236 | IP_VS_DBG_ADDR(svc->af, &iph->daddr), |
237 | IP_VS_DBG_ADDR(svc->af, &dest->addr), | 237 | IP_VS_DBG_ADDR(dest->af, &dest->addr), |
238 | ntohs(dest->port)); | 238 | ntohs(dest->port)); |
239 | 239 | ||
240 | return dest; | 240 | return dest; |
diff --git a/net/netfilter/ipvs/ip_vs_fo.c b/net/netfilter/ipvs/ip_vs_fo.c index 6a2647d471ff..e09874d02938 100644 --- a/net/netfilter/ipvs/ip_vs_fo.c +++ b/net/netfilter/ipvs/ip_vs_fo.c | |||
@@ -44,7 +44,7 @@ ip_vs_fo_schedule(struct ip_vs_service *svc, const struct sk_buff *skb, | |||
44 | 44 | ||
45 | if (hweight) { | 45 | if (hweight) { |
46 | IP_VS_DBG_BUF(6, "FO: server %s:%u activeconns %d weight %d\n", | 46 | IP_VS_DBG_BUF(6, "FO: server %s:%u activeconns %d weight %d\n", |
47 | IP_VS_DBG_ADDR(svc->af, &hweight->addr), | 47 | IP_VS_DBG_ADDR(hweight->af, &hweight->addr), |
48 | ntohs(hweight->port), | 48 | ntohs(hweight->port), |
49 | atomic_read(&hweight->activeconns), | 49 | atomic_read(&hweight->activeconns), |
50 | atomic_read(&hweight->weight)); | 50 | atomic_read(&hweight->weight)); |
diff --git a/net/netfilter/ipvs/ip_vs_lc.c b/net/netfilter/ipvs/ip_vs_lc.c index 2bdcb1cf2127..19a0769a989a 100644 --- a/net/netfilter/ipvs/ip_vs_lc.c +++ b/net/netfilter/ipvs/ip_vs_lc.c | |||
@@ -59,7 +59,7 @@ ip_vs_lc_schedule(struct ip_vs_service *svc, const struct sk_buff *skb, | |||
59 | else | 59 | else |
60 | IP_VS_DBG_BUF(6, "LC: server %s:%u activeconns %d " | 60 | IP_VS_DBG_BUF(6, "LC: server %s:%u activeconns %d " |
61 | "inactconns %d\n", | 61 | "inactconns %d\n", |
62 | IP_VS_DBG_ADDR(svc->af, &least->addr), | 62 | IP_VS_DBG_ADDR(least->af, &least->addr), |
63 | ntohs(least->port), | 63 | ntohs(least->port), |
64 | atomic_read(&least->activeconns), | 64 | atomic_read(&least->activeconns), |
65 | atomic_read(&least->inactconns)); | 65 | atomic_read(&least->inactconns)); |
diff --git a/net/netfilter/ipvs/ip_vs_nq.c b/net/netfilter/ipvs/ip_vs_nq.c index 961a6de9bb29..a8b63401e773 100644 --- a/net/netfilter/ipvs/ip_vs_nq.c +++ b/net/netfilter/ipvs/ip_vs_nq.c | |||
@@ -107,7 +107,8 @@ ip_vs_nq_schedule(struct ip_vs_service *svc, const struct sk_buff *skb, | |||
107 | out: | 107 | out: |
108 | IP_VS_DBG_BUF(6, "NQ: server %s:%u " | 108 | IP_VS_DBG_BUF(6, "NQ: server %s:%u " |
109 | "activeconns %d refcnt %d weight %d overhead %d\n", | 109 | "activeconns %d refcnt %d weight %d overhead %d\n", |
110 | IP_VS_DBG_ADDR(svc->af, &least->addr), ntohs(least->port), | 110 | IP_VS_DBG_ADDR(least->af, &least->addr), |
111 | ntohs(least->port), | ||
111 | atomic_read(&least->activeconns), | 112 | atomic_read(&least->activeconns), |
112 | atomic_read(&least->refcnt), | 113 | atomic_read(&least->refcnt), |
113 | atomic_read(&least->weight), loh); | 114 | atomic_read(&least->weight), loh); |
diff --git a/net/netfilter/ipvs/ip_vs_rr.c b/net/netfilter/ipvs/ip_vs_rr.c index 176b87c35e34..58bacfc461ee 100644 --- a/net/netfilter/ipvs/ip_vs_rr.c +++ b/net/netfilter/ipvs/ip_vs_rr.c | |||
@@ -95,7 +95,7 @@ stop: | |||
95 | spin_unlock_bh(&svc->sched_lock); | 95 | spin_unlock_bh(&svc->sched_lock); |
96 | IP_VS_DBG_BUF(6, "RR: server %s:%u " | 96 | IP_VS_DBG_BUF(6, "RR: server %s:%u " |
97 | "activeconns %d refcnt %d weight %d\n", | 97 | "activeconns %d refcnt %d weight %d\n", |
98 | IP_VS_DBG_ADDR(svc->af, &dest->addr), ntohs(dest->port), | 98 | IP_VS_DBG_ADDR(dest->af, &dest->addr), ntohs(dest->port), |
99 | atomic_read(&dest->activeconns), | 99 | atomic_read(&dest->activeconns), |
100 | atomic_read(&dest->refcnt), atomic_read(&dest->weight)); | 100 | atomic_read(&dest->refcnt), atomic_read(&dest->weight)); |
101 | 101 | ||
diff --git a/net/netfilter/ipvs/ip_vs_sed.c b/net/netfilter/ipvs/ip_vs_sed.c index e446b9fa7424..f8e2d00f528b 100644 --- a/net/netfilter/ipvs/ip_vs_sed.c +++ b/net/netfilter/ipvs/ip_vs_sed.c | |||
@@ -108,7 +108,8 @@ ip_vs_sed_schedule(struct ip_vs_service *svc, const struct sk_buff *skb, | |||
108 | 108 | ||
109 | IP_VS_DBG_BUF(6, "SED: server %s:%u " | 109 | IP_VS_DBG_BUF(6, "SED: server %s:%u " |
110 | "activeconns %d refcnt %d weight %d overhead %d\n", | 110 | "activeconns %d refcnt %d weight %d overhead %d\n", |
111 | IP_VS_DBG_ADDR(svc->af, &least->addr), ntohs(least->port), | 111 | IP_VS_DBG_ADDR(least->af, &least->addr), |
112 | ntohs(least->port), | ||
112 | atomic_read(&least->activeconns), | 113 | atomic_read(&least->activeconns), |
113 | atomic_read(&least->refcnt), | 114 | atomic_read(&least->refcnt), |
114 | atomic_read(&least->weight), loh); | 115 | atomic_read(&least->weight), loh); |
diff --git a/net/netfilter/ipvs/ip_vs_sh.c b/net/netfilter/ipvs/ip_vs_sh.c index cc65b2f42cd4..98a13433b68c 100644 --- a/net/netfilter/ipvs/ip_vs_sh.c +++ b/net/netfilter/ipvs/ip_vs_sh.c | |||
@@ -138,7 +138,7 @@ ip_vs_sh_get_fallback(struct ip_vs_service *svc, struct ip_vs_sh_state *s, | |||
138 | return dest; | 138 | return dest; |
139 | 139 | ||
140 | IP_VS_DBG_BUF(6, "SH: selected unavailable server %s:%d, reselecting", | 140 | IP_VS_DBG_BUF(6, "SH: selected unavailable server %s:%d, reselecting", |
141 | IP_VS_DBG_ADDR(svc->af, &dest->addr), ntohs(dest->port)); | 141 | IP_VS_DBG_ADDR(dest->af, &dest->addr), ntohs(dest->port)); |
142 | 142 | ||
143 | /* if the original dest is unavailable, loop around the table | 143 | /* if the original dest is unavailable, loop around the table |
144 | * starting from ihash to find a new dest | 144 | * starting from ihash to find a new dest |
@@ -153,7 +153,7 @@ ip_vs_sh_get_fallback(struct ip_vs_service *svc, struct ip_vs_sh_state *s, | |||
153 | return dest; | 153 | return dest; |
154 | IP_VS_DBG_BUF(6, "SH: selected unavailable " | 154 | IP_VS_DBG_BUF(6, "SH: selected unavailable " |
155 | "server %s:%d (offset %d), reselecting", | 155 | "server %s:%d (offset %d), reselecting", |
156 | IP_VS_DBG_ADDR(svc->af, &dest->addr), | 156 | IP_VS_DBG_ADDR(dest->af, &dest->addr), |
157 | ntohs(dest->port), roffset); | 157 | ntohs(dest->port), roffset); |
158 | } | 158 | } |
159 | 159 | ||
@@ -192,7 +192,7 @@ ip_vs_sh_reassign(struct ip_vs_sh_state *s, struct ip_vs_service *svc) | |||
192 | RCU_INIT_POINTER(b->dest, dest); | 192 | RCU_INIT_POINTER(b->dest, dest); |
193 | 193 | ||
194 | IP_VS_DBG_BUF(6, "assigned i: %d dest: %s weight: %d\n", | 194 | IP_VS_DBG_BUF(6, "assigned i: %d dest: %s weight: %d\n", |
195 | i, IP_VS_DBG_ADDR(svc->af, &dest->addr), | 195 | i, IP_VS_DBG_ADDR(dest->af, &dest->addr), |
196 | atomic_read(&dest->weight)); | 196 | atomic_read(&dest->weight)); |
197 | 197 | ||
198 | /* Don't move to next dest until filling weight */ | 198 | /* Don't move to next dest until filling weight */ |
@@ -342,7 +342,7 @@ ip_vs_sh_schedule(struct ip_vs_service *svc, const struct sk_buff *skb, | |||
342 | 342 | ||
343 | IP_VS_DBG_BUF(6, "SH: source IP address %s --> server %s:%d\n", | 343 | IP_VS_DBG_BUF(6, "SH: source IP address %s --> server %s:%d\n", |
344 | IP_VS_DBG_ADDR(svc->af, &iph->saddr), | 344 | IP_VS_DBG_ADDR(svc->af, &iph->saddr), |
345 | IP_VS_DBG_ADDR(svc->af, &dest->addr), | 345 | IP_VS_DBG_ADDR(dest->af, &dest->addr), |
346 | ntohs(dest->port)); | 346 | ntohs(dest->port)); |
347 | 347 | ||
348 | return dest; | 348 | return dest; |
diff --git a/net/netfilter/ipvs/ip_vs_wlc.c b/net/netfilter/ipvs/ip_vs_wlc.c index b5b4650d50a9..6b366fd90554 100644 --- a/net/netfilter/ipvs/ip_vs_wlc.c +++ b/net/netfilter/ipvs/ip_vs_wlc.c | |||
@@ -80,7 +80,8 @@ ip_vs_wlc_schedule(struct ip_vs_service *svc, const struct sk_buff *skb, | |||
80 | 80 | ||
81 | IP_VS_DBG_BUF(6, "WLC: server %s:%u " | 81 | IP_VS_DBG_BUF(6, "WLC: server %s:%u " |
82 | "activeconns %d refcnt %d weight %d overhead %d\n", | 82 | "activeconns %d refcnt %d weight %d overhead %d\n", |
83 | IP_VS_DBG_ADDR(svc->af, &least->addr), ntohs(least->port), | 83 | IP_VS_DBG_ADDR(least->af, &least->addr), |
84 | ntohs(least->port), | ||
84 | atomic_read(&least->activeconns), | 85 | atomic_read(&least->activeconns), |
85 | atomic_read(&least->refcnt), | 86 | atomic_read(&least->refcnt), |
86 | atomic_read(&least->weight), loh); | 87 | atomic_read(&least->weight), loh); |
diff --git a/net/netfilter/ipvs/ip_vs_wrr.c b/net/netfilter/ipvs/ip_vs_wrr.c index 0546cd572d6b..17e6d4406ca7 100644 --- a/net/netfilter/ipvs/ip_vs_wrr.c +++ b/net/netfilter/ipvs/ip_vs_wrr.c | |||
@@ -216,7 +216,7 @@ ip_vs_wrr_schedule(struct ip_vs_service *svc, const struct sk_buff *skb, | |||
216 | found: | 216 | found: |
217 | IP_VS_DBG_BUF(6, "WRR: server %s:%u " | 217 | IP_VS_DBG_BUF(6, "WRR: server %s:%u " |
218 | "activeconns %d refcnt %d weight %d\n", | 218 | "activeconns %d refcnt %d weight %d\n", |
219 | IP_VS_DBG_ADDR(svc->af, &dest->addr), ntohs(dest->port), | 219 | IP_VS_DBG_ADDR(dest->af, &dest->addr), ntohs(dest->port), |
220 | atomic_read(&dest->activeconns), | 220 | atomic_read(&dest->activeconns), |
221 | atomic_read(&dest->refcnt), | 221 | atomic_read(&dest->refcnt), |
222 | atomic_read(&dest->weight)); | 222 | atomic_read(&dest->weight)); |