From patchwork Thu May 24 22:26:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Marx X-Patchwork-Id: 1783 Return-Path: Received: from mail01.ipfire.org (unknown [172.28.1.200]) by web02.i.ipfire.org (Postfix) with ESMTP id 4EF0F615E2 for ; Thu, 24 May 2018 14:26:11 +0200 (CEST) Received: from mail01.i.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id 4880A110BF3D; Thu, 24 May 2018 13:26:10 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201801; t=1527164770; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references:list-id: list-unsubscribe:list-subscribe:list-post; bh=AzxELETFpBLo3Zp52MYoL/mN3glvUvRSddo+tQy2M1A=; b=KkP7LwZBD86qWCgQfc/HWXmMc9KRjzkRa3YIIJhoMPqn9OXY75iQ92l1w8Qy/HFKqz0U0C sO8anLPDfDSYlDsiWu+VfdqbdATlXC/OU8Ez7FxFJOdbMUSD8uaUqPY60+TXBcCqlHGpfM ru1wrexuM9M9Th+UM85UML5Q6E98Zuacw8fkL8uSkIyJQ+oviwk/pmmMl38NiM3uzSKmMx MI9SF7Cp7tOsbpuiua9q3iZ9M8fckim4EzCaZWg8+UlmPXO0f7bOmRktkOOxQeA0WUBeM9 HoaUibvQCH5WYXuPrlgaLLHnaANjp8cYKICN0Dc83HHWNefAlM9tx2K/r2JzDw== Authentication-Results: mail01.i.ipfire.org; auth=pass smtp.auth=amarx smtp.mailfrom=alexander.marx@ipfire.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201801; t=1527164767; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=AzxELETFpBLo3Zp52MYoL/mN3glvUvRSddo+tQy2M1A=; b=tGONLVl8RRHicxmAzplooarjB3u/z18TaF7BiHO8ICDrfHOOOSYN3u2/GxCVi/h8cNO5PQ 4yXYsMONtsd7Q0eVmBGdQgDe1OaOQJvHtAvQGbsgr0QV07DB2oaG7nc8Td45c83MGuV1Dv Rcjx1OBzHmHhuohiBLCNPX6etmKURo9IV12+rWLbo/rHDTtQY1ZZD21iScYM0e0mHFeFin P24ZXZHSiJWUh2mHDzc27I2JRMmyAmee+n043yeaFczNhG57U6fAowitpplHDczft0VtDo VElLtUUI5Ha/9rwU881Xe7Vfl16X7pJHcfAHFb/TXMGRNr1KHG/Do2bDnugQ8w== Received: from EDV1.kappeln2011.lan (business-90-187-3-157.pool2.vodafone-ip.de [90.187.3.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id EA62A110BF28; Thu, 24 May 2018 13:26:06 +0100 (BST) From: Alexander Marx To: development@lists.ipfire.org Subject: [PATCH] BUG11695: Adding/editing rules with preset broken Date: Thu, 24 May 2018 14:26:04 +0200 Message-Id: <1527164764-17533-1-git-send-email-alexander.marx@ipfire.org> X-Mailer: git-send-email 2.7.4 X-Spamd-Result: default: False [-4.97 / 11.00]; ASN(0.00)[asn:31334, ipnet:90.187.0.0/16, country:DE]; DKIM_SIGNED(0.00)[]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; ARC_NA(0.00)[]; BAYES_HAM(-3.00)[100.00%]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MID_CONTAINS_FROM(1.00)[]; RCVD_COUNT_ZERO(0.00)[0]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM(-2.87)[-0.956,0] X-Spam-Status: No, score=-4.97 X-Rspamd-Server: mail01.i.ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" added another check to fill same ports in source and destination when a custom service is selected. Signed-off-by: Alexander Marx Reported-by: erik@vanlinsteeict.nl --- html/cgi-bin/firewall.cgi | 1 + 1 file changed, 1 insertion(+) diff --git a/html/cgi-bin/firewall.cgi b/html/cgi-bin/firewall.cgi index 499f279..d17afab 100644 --- a/html/cgi-bin/firewall.cgi +++ b/html/cgi-bin/firewall.cgi @@ -757,6 +757,7 @@ sub checkrule } } if($fwdfwsettings{'nat'} eq 'dnat' && $fwdfwsettings{'dnatport'} eq ''){$fwdfwsettings{'dnatport'}=$custsrvport;} + if($fwdfwsettings{'nat'} eq 'dnat' && $fwdfwsettings{'grp3'} eq 'cust_srv'){$fwdfwsettings{'dnatport'}=$custsrvport;} } #check if DNAT port is multiple if($fwdfwsettings{'nat'} eq 'dnat' && $fwdfwsettings{'dnatport'} ne ''){