From patchwork Wed Mar 25 08:53:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 454303 X-Patchwork-Delegate: pablo@netfilter.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id C0C6F140079 for ; Wed, 25 Mar 2015 19:54:19 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="verification failed; unprotected key" header.d=gmail.com header.i=@gmail.com header.b=Xx1wM6vz; dkim-adsp=none (unprotected policy); dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752085AbbCYIyS (ORCPT ); Wed, 25 Mar 2015 04:54:18 -0400 Received: from mail-wg0-f42.google.com ([74.125.82.42]:34536 "EHLO mail-wg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751029AbbCYIyQ (ORCPT ); Wed, 25 Mar 2015 04:54:16 -0400 Received: by wgs2 with SMTP id 2so19107668wgs.1 for ; Wed, 25 Mar 2015 01:54:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=0+WBxSsCnXuW7PIyHTtvGbSuEZVpMTdeNYEN9zXVXWk=; b=Xx1wM6vzGQ0uvFuJhqDPT869cQaTKnK3oQ7ef/gx7d7h5+4WkWGJA/ts/V7pUHcp17 6GJXwAbP+7K59+5IzSRV1OqDv1etYIU75Fx6VXoli6sMFfYYvCKyF8lxhvItg+DqEp2E ksqtJ8D80dg/YKret2A24HGTsJSrcM8IRk6MZEmCuB6HM6k4YUFaVAMt4aZdNip7soT2 Gn2AN96c5nNwm8cUseWXhJJdC6VBBk8LNi2FP581szB7M/aDn2zDP4H6TcbDNwUXzKfP 7TyplQa1+b+hO1lgV8uhrKV1rYIga+24IXnR6qNnZ2HKbwzcmsjpq/dqDqTM9b7AkVOZ p01Q== X-Received: by 10.194.236.200 with SMTP id uw8mr15713685wjc.10.1427273655106; Wed, 25 Mar 2015 01:54:15 -0700 (PDT) Received: from linux-tdhb.lan ([89.174.37.6]) by mx.google.com with ESMTPSA id ei8sm19558011wib.10.2015.03.25.01.54.13 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Mar 2015 01:54:14 -0700 (PDT) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: Pablo Neira Ayuso , Patrick McHardy , Jozsef Kadlecsik Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, Nicolas Dichtel , Julian Anastasov , Simon Horman , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Subject: [PATCH] ipvs: fix header inline net_ipvs function to work without CONFIG_IP_VS Date: Wed, 25 Mar 2015 09:53:57 +0100 Message-Id: <1427273637-29151-1-git-send-email-zajec5@gmail.com> X-Mailer: git-send-email 1.8.4.5 MIME-Version: 1.0 Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org Including net/ip_vs.h without CONFIG_IP_VS was causing: include/net/ip_vs.h: In function 'net_ipvs': include/net/ip_vs.h:35:12: error: 'struct net' has no member named 'ipvs' Fixes: 8b4d14d8eb368 ("netns: exclude ipvs from struct net when IPVS disabled") Signed-off-by: Rafał Miłecki --- include/net/ip_vs.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 615b20b..cd3942f 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h @@ -32,7 +32,10 @@ /* Generic access of ipvs struct */ static inline struct netns_ipvs *net_ipvs(struct net* net) { +#if IS_ENABLED(CONFIG_IP_VS) return net->ipvs; +#endif + return NULL; } /* Get net ptr from skb in traffic cases