Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp16378457rwd; Mon, 26 Jun 2023 09:11:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ45V4Eiyl3qUBM8N6FbxOjV06BJYMan4swsR3V+E0CrVXp0tUeBLfEw9NFqypAy4olAaNU/ X-Received: by 2002:a05:6402:350b:b0:51d:87d7:5a3 with SMTP id b11-20020a056402350b00b0051d87d705a3mr5661353edd.13.1687795907175; Mon, 26 Jun 2023 09:11:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687795907; cv=none; d=google.com; s=arc-20160816; b=a/wL9iJSIHMnEnvc51S/QqlpGmWmF25xm+pyxEWDc0LCElj5g2dWAENZUUE3yJiePW Zypp7WH6q/J0sRhnuvuEVtpSitpIe1KQrOPU6Yaqsi/0Hrwb2v80kgTtjsBfcVa9Avtv I88obT8tDhgvGD0Ij8utjR1CgrvlTrdE1VQ8JNyuAt1tsH6keC8eHfJOVtyEK38Eldr/ 4lGc5zgTMsr8uyGfkm9iBurD/C4haRESVtnrmS7NVTv7gpWtu5N4BVa5fykceVJEP6rR ADRNc69Zs5YgRkfh8SmZ2umGzBb17OSQf+58noGNeouBnUENDvN2KwqQQYRv7Zb2Oq1g 1dtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=yth7PkDelNkFpPH5pbFH3Yn5Fq2mjGN5M7vcN89T4+A=; fh=EKPKM2wd8ipSY9ZoHMbdWCPt2V6grfU5rJIPUehMQt4=; b=duqqQ3i7Ms7UEiM2q4BzbQ8Yph7rTP4R4AXYH4aRvL3i92cqTiHIhloD7syNduOrdQ uCNKZJWSnYjKWBy6A9M8DAX31LYsAU9Nktsw33TGwXQHO9vqQthYW6eCXyrPujLLdIET IaNNC/LLKvpMFTpZ8WzHwlJOfQ3VwGEQ9LrHwROSBfB6LzFsR7112drA9s+gPqOfE0Oq m82HXeWclBPBIr8sTDrOgtIU4IFw2rj1VEChHhWFfYtpAh3ZdAPIqqgLNzg3/wZue8vI 7DU4VveonBVl++8pnvuCm4Kk8v4QjHiH/sCs+/+odgfzesOxNZBway6rqFFdZXxhs8+M KVFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w2-20020aa7da42000000b0051d897d911asi2339550eds.247.2023.06.26.09.11.21; Mon, 26 Jun 2023 09:11:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230355AbjFZPTU (ORCPT + 99 others); Mon, 26 Jun 2023 11:19:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229677AbjFZPTR (ORCPT ); Mon, 26 Jun 2023 11:19:17 -0400 Received: from mail.netfilter.org (mail.netfilter.org [217.70.188.207]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BEE1818D; Mon, 26 Jun 2023 08:19:16 -0700 (PDT) Date: Mon, 26 Jun 2023 17:19:13 +0200 From: Pablo Neira Ayuso To: Gavrilov Ilia Cc: Jozsef Kadlecsik , Florian Westphal , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Patrick McHardy , "netfilter-devel@vger.kernel.org" , "coreteam@netfilter.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "lvc-project@linuxtesting.org" , Simon Horman Subject: Re: [PATCH net] netfilter: nf_conntrack_sip: fix the ct_sip_parse_numerical_param() return value. Message-ID: References: <20230623112247.1468836-1-Ilia.Gavrilov@infotecs.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230623112247.1468836-1-Ilia.Gavrilov@infotecs.ru> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 23, 2023 at 11:23:46AM +0000, Gavrilov Ilia wrote: > From: "Ilia.Gavrilov" > > ct_sip_parse_numerical_param() returns only 0 or 1 now. > But process_register_request() and process_register_response() imply > checking for a negative value if parsing of a numerical header parameter > failed. > The invocation in nf_nat_sip() looks correct: > if (ct_sip_parse_numerical_param(...) > 0 && > ...) { ... } > > Make the return value of the function ct_sip_parse_numerical_param() > a tristate to fix all the cases > a) return 1 if value is found; *val is set > b) return 0 if value is not found; *val is unchanged > c) return -1 on error; *val is undefined Applied to nf.git