From patchwork Fri Sep 28 17:51:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Flavio Leitner X-Patchwork-Id: 976420 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42MK4S3ps8z9s3x for ; Sat, 29 Sep 2018 03:51:52 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id C69A8D1A; Fri, 28 Sep 2018 17:51:49 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id EC78ED02 for ; Fri, 28 Sep 2018 17:51:48 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-qk1-f195.google.com (mail-qk1-f195.google.com [209.85.222.195]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 8E97B7E3 for ; Fri, 28 Sep 2018 17:51:48 +0000 (UTC) Received: by mail-qk1-f195.google.com with SMTP id c126-v6so4370832qkd.7 for ; Fri, 28 Sep 2018 10:51:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=LNT3U0t+ApEZNnLBLWQ8SNKdhT9cnhCL7WuB6OvvcZo=; b=aNxdz6rHeTdWytYFR5mbv8oUFbdWEmvhb/BkvPHqvpEuEpRBk9iWNE1q203Fl+1dbZ FxhDglvHpsKqMMo3w8NcGRYfpC77MLFmXDEywVEQxC/U+xBQmV464+vvcneqTRW5KI/t wUhHX1le3bikL3YtlmE81R6Mtu6zNiJ4WIo3Pnf1CumipWoopIQ56xPdEWWCl0rP9JPl VhAb1+vHJbu1vzfi/GvkYtZmEps3eZb8DQilsTqMouggtLzDScs8RCMRU8SMrMwvQox5 Ds0i73cais66IZUu7+iwgE+CNX6haFvoxevNEwAu3xoHPJXTp3a8+xF0Fx9O2EZVtraT 3GqQ== X-Gm-Message-State: ABuFfoioEquXChDzzIl36ap3TcnryDf9f9ZLXb7K29q9dnlFNoaxJINT YDEHmRt1Td6lncf6x77EkGk/yw== X-Google-Smtp-Source: ACcGV60pkS44R1bPW9wNkZtCaNPkdIQW+9nVR2QIiyDmFtPPA9DvNWZRJz+eW1yl8+1JHehI0dmUxQ== X-Received: by 2002:a37:a107:: with SMTP id k7-v6mr12249614qke.203.1538157107695; Fri, 28 Sep 2018 10:51:47 -0700 (PDT) Received: from localhost ([177.183.215.101]) by smtp.gmail.com with ESMTPSA id f63-v6sm3372287qtb.64.2018.09.28.10.51.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 28 Sep 2018 10:51:47 -0700 (PDT) From: Flavio Leitner To: netfilter-devel@vger.kernel.org, netdev@vger.kernel.org, dev@openvswitch.org Date: Fri, 28 Sep 2018 14:51:28 -0300 Message-Id: <20180928175128.13126-1-fbl@redhat.com> X-Mailer: git-send-email 2.14.4 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Flavio Leitner Subject: [ovs-dev] [PATCH] openvswitch: load NAT helper X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Load the respective NAT helper module if the flow uses it. Signed-off-by: Flavio Leitner --- net/openvswitch/conntrack.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c index 86a75105af1a..7e9a5283e236 100644 --- a/net/openvswitch/conntrack.c +++ b/net/openvswitch/conntrack.c @@ -1312,6 +1312,10 @@ static int ovs_ct_add_helper(struct ovs_conntrack_info *info, const char *name, rcu_assign_pointer(help->helper, helper); info->helper = helper; + + if (info->nat) + request_module("ip_nat_%s", name); + return 0; }