From patchwork Tue Sep 27 21:32:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarno Rajahalme X-Patchwork-Id: 675861 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3skDZZ06rCz9s3s for ; Wed, 28 Sep 2016 07:32:37 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 12D7410560; Tue, 27 Sep 2016 14:32:32 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx3v3.cudamail.com (mx3.cudamail.com [64.34.241.5]) by archives.nicira.com (Postfix) with ESMTPS id 1DBEE1052D for ; Tue, 27 Sep 2016 14:32:31 -0700 (PDT) Received: from bar6.cudamail.com (localhost [127.0.0.1]) by mx3v3.cudamail.com (Postfix) with ESMTPS id 7AA091620F6 for ; Tue, 27 Sep 2016 15:32:30 -0600 (MDT) X-ASG-Debug-ID: 1475011948-0b323739b807540001-byXFYA Received: from mx1-pf1.cudamail.com ([192.168.24.1]) by bar6.cudamail.com with ESMTP id IpDrDSxoDdPGu6SC (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Tue, 27 Sep 2016 15:32:28 -0600 (MDT) X-Barracuda-Envelope-From: jarno@ovn.org X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.1 Received: from unknown (HELO relay5-d.mail.gandi.net) (217.70.183.197) by mx1-pf1.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 27 Sep 2016 21:32:28 -0000 Received-SPF: pass (mx1-pf1.cudamail.com: SPF record at ovn.org designates 217.70.183.197 as permitted sender) X-Barracuda-Apparent-Source-IP: 217.70.183.197 X-Barracuda-RBL-IP: 217.70.183.197 Received: from mfilter20-d.gandi.net (mfilter20-d.gandi.net [217.70.178.148]) by relay5-d.mail.gandi.net (Postfix) with ESMTP id C1D3F41C074; Tue, 27 Sep 2016 23:32:26 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter20-d.gandi.net Received: from relay5-d.mail.gandi.net ([IPv6:::ffff:217.70.183.197]) by mfilter20-d.gandi.net (mfilter20-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id sBZkyDkBrFfX; Tue, 27 Sep 2016 23:32:25 +0200 (CEST) X-Originating-IP: 208.91.1.34 Received: from sc9-mailhost3.vmware.com (unknown [208.91.1.34]) (Authenticated sender: jarno@ovn.org) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 8445441C087; Tue, 27 Sep 2016 23:32:24 +0200 (CEST) X-CudaMail-Envelope-Sender: jarno@ovn.org From: Jarno Rajahalme To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-E1-926080603 X-CudaMail-DTE: 092716 X-CudaMail-Originating-IP: 217.70.183.197 Date: Tue, 27 Sep 2016 14:32:07 -0700 X-ASG-Orig-Subj: [##CM-E1-926080603##][PATCH v2 2/3] ofp-actions: Check that 'alg=ftp' matches on TCP. Message-Id: <1475011928-105778-2-git-send-email-jarno@ovn.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1475011928-105778-1-git-send-email-jarno@ovn.org> References: <1475011928-105778-1-git-send-email-jarno@ovn.org> X-Barracuda-Connect: UNKNOWN[192.168.24.1] X-Barracuda-Start-Time: 1475011948 X-Barracuda-Encrypted: ECDHE-RSA-AES256-GCM-SHA384 X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-ASG-Whitelist: Header =?UTF-8?B?eFwtY3VkYW1haWxcLXdoaXRlbGlzdFwtdG8=?= X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 Subject: [ovs-dev] [PATCH v2 2/3] ofp-actions: Check that 'alg=ftp' matches on TCP. X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" Datapath flow setup fails when setting the FTP helper on an unsupported IP protocol. It is better to fail at the OpenFlow rule set-up time instead. Signed-off-by: Jarno Rajahalme Acked-by: Joe Stringer --- lib/ofp-actions.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c index 6fea508..f896f98 100644 --- a/lib/ofp-actions.c +++ b/lib/ofp-actions.c @@ -7031,7 +7031,8 @@ ofpact_check__(enum ofputil_protocol *usable_protocols, struct ofpact *a, struct ofpact_conntrack *oc = ofpact_get_CT(a); if (!dl_type_is_ip_any(flow->dl_type) - || (flow->ct_state & CS_INVALID && oc->flags & NX_CT_F_COMMIT)) { + || (flow->ct_state & CS_INVALID && oc->flags & NX_CT_F_COMMIT) + || (oc->alg == IPPORT_FTP && flow->nw_proto != IPPROTO_TCP)) { inconsistent_match(usable_protocols); }