Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1390070pxa; Fri, 28 Aug 2020 11:16:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySE/ZfLLUqLzzyZVpzEZLc70zIHsg7WsI+yJbNJeQ6+tapyQU5Qb11aiIH1/w82MNIXoO7 X-Received: by 2002:a50:ed8e:: with SMTP id h14mr3106427edr.155.1598638579643; Fri, 28 Aug 2020 11:16:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598638579; cv=none; d=google.com; s=arc-20160816; b=XnZP34Bxbu7cDgj+RIbxJ6t6FEfuqAKFtWnuXhd7iazTSXgR/SwQnBCS+6aiX+78CD n0lfn7s8nKrxWMNSgS7pXtK8cFGjdkWT2eD0fHi50DLPmU2puua8H1saAhvJa13nedP0 oW+dvcq/CiMpxgZ09X34pzyICBCcSs7rTqSZMu4jjRk+CQzd1vzaufmlJiH+qAHReDs/ TLEng3A1wqLCARKPnpVLkJOtv0UrUWwIBi/OVlhQczKVVomRYMja4AJ8o/RNLY0cTX5M eZyvBJrCZLZPGxds9JwhIE7W6Ty1/o1FS21yMepPgDvLuUhQqfpSNjw+vH3PjM0xepqW JztQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=uei2oX6+R5/bya0knk1RWjU3wT5D0mfsVI+rbrGek1E=; b=ZfKvOxQTFaPGmpOXxApm8zBK4s6Wwn/Aes9/4tvbF6Scx3p35V6ooFsOAIokYs8P42 z8eMR7f9wQbAvsON8Sp2OXvSFUxk1nDf10b7FGk9aWrJMR/HzllnQHPAKZ5Mfkey7m9B KD5T6Vb6EKiCPNQKg6IBp7A3uOAtyqhciY3WODJZztBwQJW1VyBdZJ6JztlwgCtuc++g TT2U3X0oUxtf63yDZzW5pgryss3O0g2LD/LDI9nKIOARuKA3yqrVm2y4whfFeLRKFBgs vJAahu/PgPkK+JWpzJgFsDdBp9CD/f5r2mHfvj44u/ldqN582Sd5agq+UWeZZWLP+a+p l1fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RYiNHPwx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ch16si1164282edb.280.2020.08.28.11.15.54; Fri, 28 Aug 2020 11:16:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RYiNHPwx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727949AbgH1SPC (ORCPT + 99 others); Fri, 28 Aug 2020 14:15:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726010AbgH1SPA (ORCPT ); Fri, 28 Aug 2020 14:15:00 -0400 Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1009DC061264; Fri, 28 Aug 2020 11:15:00 -0700 (PDT) Received: by mail-io1-xd43.google.com with SMTP id d18so2308784iop.13; Fri, 28 Aug 2020 11:15:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=uei2oX6+R5/bya0knk1RWjU3wT5D0mfsVI+rbrGek1E=; b=RYiNHPwxJXlh7AlH6vgL7jadjJxZAhq4gkMI8otSZ5k3wL/xN236LHimM8GrheJ+y8 GyJbk2s+SfRhrLtagmZ9qWDEqzbLUeEPylMIl2i2QzCUFkZ46pTxc0D2I6waHrWJZFBN DYnJr0VWvxzBM7dI6jKw40o3eCYpuZ7IGwlOiO7N+ipbd9SczNCJeVcaLfCZ39NG+dOv QlONB4ou+zLz8EzYVQlunexeX+Iy7z7yWvxnRDBhw16HSrhumzWqJj3Hz0ufcAz/BLI7 6NvbJncvYp1eDl0cWDolrb+lIX6+te9KSnpnp/QUK4gFIQsf8m/oPJngkvzxQdnqtdr3 T0iA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uei2oX6+R5/bya0knk1RWjU3wT5D0mfsVI+rbrGek1E=; b=TjXpsfWilF42J68qvWsJY4XyHHYPTUgnvtNX7BGDbHxblPF3jqVAc+l7WhXwL7qHQO Qz4UuA+VmchFVluuC9lrD3KAvIjdBf6fQcmiE+UXPS0rRuq/H79u58giG6rsmtecL+sT /wjzbRmqnCQw4WNCcFPNB7lVwP+c2T1qsShpr51SpzmTQhllJk3szJN4qT7Txu/cUce1 w+U46xQcrhc/8zc89HJmeYmmV6B4Lm/hdyRccN2/2AO6c4ChUurhg1dtDpW3ODDGRWDA dzeRzHtWf3CGZ5eY36Uf+TYXU6fPnMe84XfqW9ewt+WGVnU5LigZZQFbhAu+nPPC/sUU r+Gw== X-Gm-Message-State: AOAM532LGYWPPNCnTs+9WaNePo8hhHhAuFtbizMvMN0YVWzDbYkZCfJ8 k5Vg39oIcXE3BfUaYRgLrZz+LaYntXRKBtAYgKCvqVXyqZd0jw== X-Received: by 2002:a6b:c953:: with SMTP id z80mr2084073iof.178.1598638499277; Fri, 28 Aug 2020 11:14:59 -0700 (PDT) MIME-Version: 1.0 References: <20200815165030.5849-1-ztong0001@gmail.com> <20200828180742.GA20488@salvia> In-Reply-To: <20200828180742.GA20488@salvia> From: Tong Zhang Date: Fri, 28 Aug 2020 14:14:48 -0400 Message-ID: Subject: Re: [PATCH] netfilter: nf_conntrack_sip: fix parsing error To: Pablo Neira Ayuso Cc: kadlec@netfilter.org, fw@strlen.de, davem@davemloft.net, kuba@kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Pablo, I'm not an expert in this networking stuff. But from my point of view there's no point in checking if this condition is always true. There's also no need of returning anything from the ct_sip_parse_numerical_param() if they are all being ignored like this. On Fri, Aug 28, 2020 at 2:07 PM Pablo Neira Ayuso wrote: > Is this are real issue in your setup or probably some static analysis > tool is reporting? > > You are right that ct_sip_parse_numerical_param() never returns < 0, > however, looking at: > > https://tools.ietf.org/html/rfc3261 see Page 161 > > expires is optional, my understanding is that your patch is making > this option mandatory.