From patchwork Tue Sep 9 23:40:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Gartrell X-Patchwork-Id: 387494 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id E4B1C14018A for ; Wed, 10 Sep 2014 09:42:09 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753209AbaIIXmC (ORCPT ); Tue, 9 Sep 2014 19:42:02 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:6368 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752836AbaIIXkz (ORCPT ); Tue, 9 Sep 2014 19:40:55 -0400 Received: from pps.filterd (m0004348 [127.0.0.1]) by m0004348.ppops.net (8.14.5/8.14.5) with SMTP id s89NYBj9014158 for ; Tue, 9 Sep 2014 16:40:55 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fb.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=facebook; bh=mS9+bcZ+6nx86e0p1cS8kIIhA8kNCSEcFBSuxkoeqcw=; b=inDgiXx8SwUJexrJMk9GH+HRR5xLnTgYKGV/JMdmrobQHuUlCaDUiLr1v/8pN+ZrRbwD 6s42Wabtk/QuxVHhFIVSPtlv1gLv/5Se/mcd9xcYsH867mzJtVYU/35MxPrNOoQ5B+Ps M0bdSSwa13TAIoY/Fs1CPgI14Tcy1D4AOP0= Received: from mail.thefacebook.com (mailwest.thefacebook.com [173.252.71.148]) by m0004348.ppops.net with ESMTP id 1p90t1c1tw-5 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=OK) for ; Tue, 09 Sep 2014 16:40:54 -0700 Received: from mx-out.facebook.com (192.168.57.29) by PRN-CHUB13.TheFacebook.com (192.168.16.23) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 9 Sep 2014 16:40:52 -0700 Received: from facebook.com (2401:db00:20:7017:face:0:13:0) by mx-out.facebook.com (10.103.99.99) with ESMTP id bc35a17e387a11e487b70002c9dfb610-da6ea3f0 for ; Tue, 09 Sep 2014 16:40:52 -0700 Received: by devbig020.prn2.facebook.com (Postfix, from userid 4221) id 36DD46813DF5; Tue, 9 Sep 2014 16:40:52 -0700 (PDT) From: Alex Gartrell To: CC: , , , , , Alex Gartrell Subject: [PATCH net-next 17/20] ipvs: use correct address family in SH logs Date: Tue, 9 Sep 2014 16:40:36 -0700 Message-ID: <1410306039-2977-18-git-send-email-agartrell@fb.com> X-Mailer: git-send-email 1.8.1 In-Reply-To: <1410306039-2977-1-git-send-email-agartrell@fb.com> References: <1410306039-2977-1-git-send-email-agartrell@fb.com> X-FB-Internal: Safe MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.12.52, 1.0.28, 0.0.0000 definitions=2014-09-09_07:2014-09-09, 2014-09-09, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=fb_default_notspam policy=fb_default score=0 kscore.is_bulkscore=2.49446380218288e-09 kscore.compositescore=0 circleOfTrustscore=514.84 compositescore=0.999775624998249 urlsuspect_oldscore=0.999775624998249 suspectscore=1 recipient_domain_to_sender_totalscore=0 phishscore=0 bulkscore=0 kscore.is_spamscore=0 recipient_to_sender_totalscore=0 recipient_domain_to_sender_domain_totalscore=64355 rbsscore=0.999775624998249 spamscore=0 recipient_to_sender_domain_totalscore=0 urlsuspectscore=0.9 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1409090196 X-FB-Internal: deliver Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Julian Anastasov Needed to support svc->af != dest->af. Signed-off-by: Julian Anastasov Signed-off-by: Alex Gartrell --- net/netfilter/ipvs/ip_vs_sh.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/netfilter/ipvs/ip_vs_sh.c b/net/netfilter/ipvs/ip_vs_sh.c index cc65b2f..98a1343 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, 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;