ipvs: use correct address family in scheduler logs
authorJulian Anastasov <ja@ssi.bg>
Tue, 16 Sep 2014 21:09:00 +0000 (00:09 +0300)
committerSimon Horman <horms@verge.net.au>
Wed, 17 Sep 2014 23:59:23 +0000 (08:59 +0900)
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>
net/netfilter/ipvs/ip_vs_dh.c
net/netfilter/ipvs/ip_vs_fo.c
net/netfilter/ipvs/ip_vs_lc.c
net/netfilter/ipvs/ip_vs_nq.c
net/netfilter/ipvs/ip_vs_rr.c
net/netfilter/ipvs/ip_vs_sed.c
net/netfilter/ipvs/ip_vs_sh.c
net/netfilter/ipvs/ip_vs_wlc.c
net/netfilter/ipvs/ip_vs_wrr.c

index c3b84546ea9e2b385878f07eeae926495890ad1f..6be5c538b71e6fda1085bf01849af5d9df169895 100644 (file)
@@ -234,7 +234,7 @@ ip_vs_dh_schedule(struct ip_vs_service *svc, const struct sk_buff *skb,
 
        IP_VS_DBG_BUF(6, "DH: destination IP address %s --> server %s:%d\n",
                      IP_VS_DBG_ADDR(svc->af, &iph->daddr),
-                     IP_VS_DBG_ADDR(svc->af, &dest->addr),
+                     IP_VS_DBG_ADDR(dest->af, &dest->addr),
                      ntohs(dest->port));
 
        return dest;
index 6a2647d471ff7a4e73f043152d8580b96ec38f02..e09874d02938721c24d2215496265c0c191cb9f0 100644 (file)
@@ -44,7 +44,7 @@ ip_vs_fo_schedule(struct ip_vs_service *svc, const struct sk_buff *skb,
 
        if (hweight) {
                IP_VS_DBG_BUF(6, "FO: server %s:%u activeconns %d weight %d\n",
-                             IP_VS_DBG_ADDR(svc->af, &hweight->addr),
+                             IP_VS_DBG_ADDR(hweight->af, &hweight->addr),
                              ntohs(hweight->port),
                              atomic_read(&hweight->activeconns),
                              atomic_read(&hweight->weight));
index 2bdcb1cf21279db80ebb0af0b091f600e8b4921b..19a0769a989aa331de570dd6ee2514db454f83ae 100644 (file)
@@ -59,7 +59,7 @@ ip_vs_lc_schedule(struct ip_vs_service *svc, const struct sk_buff *skb,
        else
                IP_VS_DBG_BUF(6, "LC: server %s:%u activeconns %d "
                              "inactconns %d\n",
-                             IP_VS_DBG_ADDR(svc->af, &least->addr),
+                             IP_VS_DBG_ADDR(least->af, &least->addr),
                              ntohs(least->port),
                              atomic_read(&least->activeconns),
                              atomic_read(&least->inactconns));
index 961a6de9bb29035458945185f488a5fc1209ba00..a8b63401e7731e6c8fef37b62c43425e2f96b43c 100644 (file)
@@ -107,7 +107,8 @@ ip_vs_nq_schedule(struct ip_vs_service *svc, const struct sk_buff *skb,
   out:
        IP_VS_DBG_BUF(6, "NQ: server %s:%u "
                      "activeconns %d refcnt %d weight %d overhead %d\n",
-                     IP_VS_DBG_ADDR(svc->af, &least->addr), ntohs(least->port),
+                     IP_VS_DBG_ADDR(least->af, &least->addr),
+                     ntohs(least->port),
                      atomic_read(&least->activeconns),
                      atomic_read(&least->refcnt),
                      atomic_read(&least->weight), loh);
index 176b87c35e34ea2b438739d21a3439f1ebade995..58bacfc461ee6a1d6df4e6e024032fb52a044e35 100644 (file)
@@ -95,7 +95,7 @@ stop:
        spin_unlock_bh(&svc->sched_lock);
        IP_VS_DBG_BUF(6, "RR: server %s:%u "
                      "activeconns %d refcnt %d weight %d\n",
-                     IP_VS_DBG_ADDR(svc->af, &dest->addr), ntohs(dest->port),
+                     IP_VS_DBG_ADDR(dest->af, &dest->addr), ntohs(dest->port),
                      atomic_read(&dest->activeconns),
                      atomic_read(&dest->refcnt), atomic_read(&dest->weight));
 
index e446b9fa7424c6382cb65433447f3febe2b17eeb..f8e2d00f528b945e774564854fc66f53dbc61970 100644 (file)
@@ -108,7 +108,8 @@ ip_vs_sed_schedule(struct ip_vs_service *svc, const struct sk_buff *skb,
 
        IP_VS_DBG_BUF(6, "SED: server %s:%u "
                      "activeconns %d refcnt %d weight %d overhead %d\n",
-                     IP_VS_DBG_ADDR(svc->af, &least->addr), ntohs(least->port),
+                     IP_VS_DBG_ADDR(least->af, &least->addr),
+                     ntohs(least->port),
                      atomic_read(&least->activeconns),
                      atomic_read(&least->refcnt),
                      atomic_read(&least->weight), loh);
index cc65b2f42cd40283fab4ed5a24a82767d8190a89..98a13433b68c226fee24e3421d5c46c5f0cc8a75 100644 (file)
@@ -138,7 +138,7 @@ ip_vs_sh_get_fallback(struct ip_vs_service *svc, struct ip_vs_sh_state *s,
                return dest;
 
        IP_VS_DBG_BUF(6, "SH: selected unavailable server %s:%d, reselecting",
-                     IP_VS_DBG_ADDR(svc->af, &dest->addr), ntohs(dest->port));
+                     IP_VS_DBG_ADDR(dest->af, &dest->addr), ntohs(dest->port));
 
        /* if the original dest is unavailable, loop around the table
         * 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,
                        return dest;
                IP_VS_DBG_BUF(6, "SH: selected unavailable "
                              "server %s:%d (offset %d), reselecting",
-                             IP_VS_DBG_ADDR(svc->af, &dest->addr),
+                             IP_VS_DBG_ADDR(dest->af, &dest->addr),
                              ntohs(dest->port), roffset);
        }
 
@@ -192,7 +192,7 @@ ip_vs_sh_reassign(struct ip_vs_sh_state *s, struct ip_vs_service *svc)
                        RCU_INIT_POINTER(b->dest, dest);
 
                        IP_VS_DBG_BUF(6, "assigned i: %d dest: %s weight: %d\n",
-                                     i, IP_VS_DBG_ADDR(svc->af, &dest->addr),
+                                     i, IP_VS_DBG_ADDR(dest->af, &dest->addr),
                                      atomic_read(&dest->weight));
 
                        /* 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,
 
        IP_VS_DBG_BUF(6, "SH: source IP address %s --> server %s:%d\n",
                      IP_VS_DBG_ADDR(svc->af, &iph->saddr),
-                     IP_VS_DBG_ADDR(svc->af, &dest->addr),
+                     IP_VS_DBG_ADDR(dest->af, &dest->addr),
                      ntohs(dest->port));
 
        return dest;
index b5b4650d50a9180f211e6cce82e3393ece2fc11c..6b366fd905542ff086a36da4111bd11646d274d8 100644 (file)
@@ -80,7 +80,8 @@ ip_vs_wlc_schedule(struct ip_vs_service *svc, const struct sk_buff *skb,
 
        IP_VS_DBG_BUF(6, "WLC: server %s:%u "
                      "activeconns %d refcnt %d weight %d overhead %d\n",
-                     IP_VS_DBG_ADDR(svc->af, &least->addr), ntohs(least->port),
+                     IP_VS_DBG_ADDR(least->af, &least->addr),
+                     ntohs(least->port),
                      atomic_read(&least->activeconns),
                      atomic_read(&least->refcnt),
                      atomic_read(&least->weight), loh);
index 0546cd572d6b84bfe3d9feaea40d78e88cd6d23c..17e6d4406ca7c32657eff5e103d0aa1b9317e813 100644 (file)
@@ -216,7 +216,7 @@ ip_vs_wrr_schedule(struct ip_vs_service *svc, const struct sk_buff *skb,
 found:
        IP_VS_DBG_BUF(6, "WRR: server %s:%u "
                      "activeconns %d refcnt %d weight %d\n",
-                     IP_VS_DBG_ADDR(svc->af, &dest->addr), ntohs(dest->port),
+                     IP_VS_DBG_ADDR(dest->af, &dest->addr), ntohs(dest->port),
                      atomic_read(&dest->activeconns),
                      atomic_read(&dest->refcnt),
                      atomic_read(&dest->weight));