From patchwork Sat May 5 12:44:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Sutter X-Patchwork-Id: 909132 X-Patchwork-Delegate: pablo@netfilter.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netfilter-devel-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=nwl.cc Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 40dT9N4xbxz9s27 for ; Sat, 5 May 2018 22:44:40 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751157AbeEEMoi (ORCPT ); Sat, 5 May 2018 08:44:38 -0400 Received: from orbyte.nwl.cc ([151.80.46.58]:52922 "EHLO orbyte.nwl.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750821AbeEEMoi (ORCPT ); Sat, 5 May 2018 08:44:38 -0400 Received: from localhost ([::1]:39966 helo=tatos) by orbyte.nwl.cc with esmtp (Exim 4.90_1) (envelope-from ) id 1fEwYG-0007v4-Qg; Sat, 05 May 2018 14:44:36 +0200 From: Phil Sutter To: Pablo Neira Ayuso Cc: netfilter-devel@vger.kernel.org Subject: [nft PATCH] proto: Fix wrong token in proto_icmp6 Date: Sat, 5 May 2018 14:44:26 +0200 Message-Id: <20180505124426.32526-1-phil@nwl.cc> X-Mailer: git-send-email 2.17.0 Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org 'token' value of ICMP6HDR_MTU field must be 'mtu', not 'packet-too-big'. This went unnoticed because rule delinearization for icmp/icmpv6 payload expressions is problematic anyway in that different fields point to the same offset and therefore are indistinguishable. In this case, an expression like e.g. 'icmpv6 mtu 1500' will be printed later as 'icmpv6 parameter-problem 1500'. Signed-off-by: Phil Sutter --- src/proto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/proto.c b/src/proto.c index 8cf29d2014dce..ed011efab2229 100644 --- a/src/proto.c +++ b/src/proto.c @@ -689,7 +689,7 @@ const struct proto_desc proto_icmp6 = { [ICMP6HDR_CODE] = ICMP6HDR_FIELD("code", icmp6_code), [ICMP6HDR_CHECKSUM] = ICMP6HDR_FIELD("checksum", icmp6_cksum), [ICMP6HDR_PPTR] = ICMP6HDR_FIELD("parameter-problem", icmp6_pptr), - [ICMP6HDR_MTU] = ICMP6HDR_FIELD("packet-too-big", icmp6_mtu), + [ICMP6HDR_MTU] = ICMP6HDR_FIELD("mtu", icmp6_mtu), [ICMP6HDR_ID] = ICMP6HDR_FIELD("id", icmp6_id), [ICMP6HDR_SEQ] = ICMP6HDR_FIELD("sequence", icmp6_seq), [ICMP6HDR_MAXDELAY] = ICMP6HDR_FIELD("max-delay", icmp6_maxdelay),