diff options
author | Julius Volz <juliusv@google.com> | 2008-09-02 09:55:53 -0400 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2008-09-04 21:17:12 -0400 |
commit | cfc78c5a09241a3a9561466834996a7fb90c4228 (patch) | |
tree | 7377af0f95a7dbfc877d927534c23c7146f3e813 /include/net/ip_vs.h | |
parent | 09571c7ae30865adfa79dccd12a822a65d2c4b5a (diff) |
IPVS: Adjust various debug outputs to use new macros
Adjust various debug outputs to use the new *_BUF macro variants for
correct output of v4/v6 addresses.
Signed-off-by: Julius Volz <juliusv@google.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'include/net/ip_vs.h')
-rw-r--r-- | include/net/ip_vs.h | 53 |
1 files changed, 33 insertions, 20 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index a719c0ef99ec..1b13cef4b547 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -680,24 +680,32 @@ static inline void ip_vs_control_del(struct ip_vs_conn *cp) | |||
680 | { | 680 | { |
681 | struct ip_vs_conn *ctl_cp = cp->control; | 681 | struct ip_vs_conn *ctl_cp = cp->control; |
682 | if (!ctl_cp) { | 682 | if (!ctl_cp) { |
683 | IP_VS_ERR("request control DEL for uncontrolled: " | 683 | IP_VS_ERR_BUF("request control DEL for uncontrolled: " |
684 | "%d.%d.%d.%d:%d to %d.%d.%d.%d:%d\n", | 684 | "%s:%d to %s:%d\n", |
685 | NIPQUAD(cp->caddr),ntohs(cp->cport), | 685 | IP_VS_DBG_ADDR(cp->af, &cp->caddr), |
686 | NIPQUAD(cp->vaddr),ntohs(cp->vport)); | 686 | ntohs(cp->cport), |
687 | IP_VS_DBG_ADDR(cp->af, &cp->vaddr), | ||
688 | ntohs(cp->vport)); | ||
689 | |||
687 | return; | 690 | return; |
688 | } | 691 | } |
689 | 692 | ||
690 | IP_VS_DBG(7, "DELeting control for: " | 693 | IP_VS_DBG_BUF(7, "DELeting control for: " |
691 | "cp.dst=%d.%d.%d.%d:%d ctl_cp.dst=%d.%d.%d.%d:%d\n", | 694 | "cp.dst=%s:%d ctl_cp.dst=%s:%d\n", |
692 | NIPQUAD(cp->caddr),ntohs(cp->cport), | 695 | IP_VS_DBG_ADDR(cp->af, &cp->caddr), |
693 | NIPQUAD(ctl_cp->caddr),ntohs(ctl_cp->cport)); | 696 | ntohs(cp->cport), |
697 | IP_VS_DBG_ADDR(cp->af, &ctl_cp->caddr), | ||
698 | ntohs(ctl_cp->cport)); | ||
694 | 699 | ||
695 | cp->control = NULL; | 700 | cp->control = NULL; |
696 | if (atomic_read(&ctl_cp->n_control) == 0) { | 701 | if (atomic_read(&ctl_cp->n_control) == 0) { |
697 | IP_VS_ERR("BUG control DEL with n=0 : " | 702 | IP_VS_ERR_BUF("BUG control DEL with n=0 : " |
698 | "%d.%d.%d.%d:%d to %d.%d.%d.%d:%d\n", | 703 | "%s:%d to %s:%d\n", |
699 | NIPQUAD(cp->caddr),ntohs(cp->cport), | 704 | IP_VS_DBG_ADDR(cp->af, &cp->caddr), |
700 | NIPQUAD(cp->vaddr),ntohs(cp->vport)); | 705 | ntohs(cp->cport), |
706 | IP_VS_DBG_ADDR(cp->af, &cp->vaddr), | ||
707 | ntohs(cp->vport)); | ||
708 | |||
701 | return; | 709 | return; |
702 | } | 710 | } |
703 | atomic_dec(&ctl_cp->n_control); | 711 | atomic_dec(&ctl_cp->n_control); |
@@ -707,17 +715,22 @@ static inline void | |||
707 | ip_vs_control_add(struct ip_vs_conn *cp, struct ip_vs_conn *ctl_cp) | 715 | ip_vs_control_add(struct ip_vs_conn *cp, struct ip_vs_conn *ctl_cp) |
708 | { | 716 | { |
709 | if (cp->control) { | 717 | if (cp->control) { |
710 | IP_VS_ERR("request control ADD for already controlled: " | 718 | IP_VS_ERR_BUF("request control ADD for already controlled: " |
711 | "%d.%d.%d.%d:%d to %d.%d.%d.%d:%d\n", | 719 | "%s:%d to %s:%d\n", |
712 | NIPQUAD(cp->caddr),ntohs(cp->cport), | 720 | IP_VS_DBG_ADDR(cp->af, &cp->caddr), |
713 | NIPQUAD(cp->vaddr),ntohs(cp->vport)); | 721 | ntohs(cp->cport), |
722 | IP_VS_DBG_ADDR(cp->af, &cp->vaddr), | ||
723 | ntohs(cp->vport)); | ||
724 | |||
714 | ip_vs_control_del(cp); | 725 | ip_vs_control_del(cp); |
715 | } | 726 | } |
716 | 727 | ||
717 | IP_VS_DBG(7, "ADDing control for: " | 728 | IP_VS_DBG_BUF(7, "ADDing control for: " |
718 | "cp.dst=%d.%d.%d.%d:%d ctl_cp.dst=%d.%d.%d.%d:%d\n", | 729 | "cp.dst=%s:%d ctl_cp.dst=%s:%d\n", |
719 | NIPQUAD(cp->caddr),ntohs(cp->cport), | 730 | IP_VS_DBG_ADDR(cp->af, &cp->caddr), |
720 | NIPQUAD(ctl_cp->caddr),ntohs(ctl_cp->cport)); | 731 | ntohs(cp->cport), |
732 | IP_VS_DBG_ADDR(cp->af, &ctl_cp->caddr), | ||
733 | ntohs(ctl_cp->cport)); | ||
721 | 734 | ||
722 | cp->control = ctl_cp; | 735 | cp->control = ctl_cp; |
723 | atomic_inc(&ctl_cp->n_control); | 736 | atomic_inc(&ctl_cp->n_control); |