From patchwork Fri Mar 15 10:50:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin 'ldir' Darbyshire-Bryant X-Patchwork-Id: 1056943 X-Patchwork-Delegate: shemminger@vyatta.com Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@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=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=darbyshire-bryant.me.uk Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=darbyshire-bryant.me.uk header.i=@darbyshire-bryant.me.uk header.b="k9fgsURd"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 44LMnB6rqyz9s00 for ; Fri, 15 Mar 2019 21:50:54 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728952AbfCOKuu (ORCPT ); Fri, 15 Mar 2019 06:50:50 -0400 Received: from mail-eopbgr70072.outbound.protection.outlook.com ([40.107.7.72]:8133 "EHLO EUR04-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728922AbfCOKuu (ORCPT ); Fri, 15 Mar 2019 06:50:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=darbyshire-bryant.me.uk; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qxDHNSQSchEiXuDGD/0CIUEYifoFXd5CthZC4RiB8bQ=; b=k9fgsURdB74AJlq1x+C9LLjO3GJQeWzFi4h+Jy/5z5PNlTurrUkgCUQjRCrgqgt2uz/ujxO1t6a3qQlcU/8YZ+w2PPkNfVihHwJBkTOCguzvEMgGDZeGV2qkK64GCnYhIU88qb/wKsrLeQSizthImagNSGS+TUR3OCLH703xXYU= Received: from VI1PR0302MB2750.eurprd03.prod.outlook.com (10.171.105.143) by VI1PR0302MB2686.eurprd03.prod.outlook.com (10.171.105.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.13; Fri, 15 Mar 2019 10:50:45 +0000 Received: from VI1PR0302MB2750.eurprd03.prod.outlook.com ([fe80::a8fc:70f:5750:d2d8]) by VI1PR0302MB2750.eurprd03.prod.outlook.com ([fe80::a8fc:70f:5750:d2d8%9]) with mapi id 15.20.1709.011; Fri, 15 Mar 2019 10:50:45 +0000 From: Kevin 'ldir' Darbyshire-Bryant To: "netdev@vger.kernel.org" CC: Kevin 'ldir' Darbyshire-Bryant Subject: [PATCH iproute2-next] tc: m_connmark: fix action error messages Thread-Topic: [PATCH iproute2-next] tc: m_connmark: fix action error messages Thread-Index: AQHU2xzx5URG1QEc90Cw4phfIRWbHw== Date: Fri, 15 Mar 2019 10:50:45 +0000 Message-ID: <20190315105026.67892-1-ldir@darbyshire-bryant.me.uk> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1P195CA0018.EURP195.PROD.OUTLOOK.COM (2603:10a6:800:d0::28) To VI1PR0302MB2750.eurprd03.prod.outlook.com (2603:10a6:800:e2::15) authentication-results: spf=none (sender IP is ) smtp.mailfrom=ldir@darbyshire-bryant.me.uk; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.2 (Apple Git-113) x-originating-ip: [2a02:c7f:1240:ee00::dc83] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 9d648b55-7781-4d80-0813-08d6a934136d x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(7021145)(8989299)(4534185)(7022145)(4603075)(4627221)(201702281549075)(8990200)(7048125)(7024125)(7027125)(7023125)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020); SRVR:VI1PR0302MB2686; x-ms-traffictypediagnostic: VI1PR0302MB2686: x-microsoft-antispam-prvs: x-forefront-prvs: 09778E995A x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(136003)(39830400003)(346002)(366004)(396003)(199004)(189003)(508600001)(99286004)(97736004)(71200400001)(15650500001)(386003)(14454004)(71190400001)(36756003)(1076003)(81156014)(256004)(1730700003)(81166006)(186003)(8676002)(6116002)(52116002)(53936002)(6506007)(50226002)(102836004)(486006)(305945005)(5640700003)(6486002)(5660300002)(6916009)(6436002)(46003)(6512007)(105586002)(68736007)(2501003)(106356001)(2351001)(316002)(107886003)(74482002)(86362001)(7736002)(8936002)(25786009)(4326008)(2906002)(476003)(2616005); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0302MB2686; H:VI1PR0302MB2750.eurprd03.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: darbyshire-bryant.me.uk does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: mMaXdzExIPU6NUNzIDTKYKqcG6VBWwwBkjOybfvMg4NSZQSv9eMish/8rnUUjh63oi6e9n42NnDtG0sCYcni4ptFKn4D8LgFaiKMH/Qcddnc+pTE2JSBZmqx33XqV8fLPq5S1yLbXykwkjTKjkHXvrqiCXuWuHd2fy6E+ox2yD7WUkP40B21IYVgP6pa7raMdK6RHiTxkrAt/xgdspP03XRZgyNeu1tHdd3EK9wvnLSdisuFhQhQc+LDO0ZkvYaPDS3y7feRuF/XNC7/JQMqC1tkfP7M09T8lNIbp40fLJ3SnQS9iCFUty+8CAN6WHosix8O4zFV0CEuTDJ/iOnoUDov5Yt9KTzearxtcgYo37nMviZ4hYOD9pVYJd6HP6oCYO6SL+nQrvHLBQ3AFregZbKT64RlYNueZC47CJTzR9Y= MIME-Version: 1.0 X-OriginatorOrg: darbyshire-bryant.me.uk X-MS-Exchange-CrossTenant-Network-Message-Id: 9d648b55-7781-4d80-0813-08d6a934136d X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Mar 2019 10:50:45.3473 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 9151708b-c553-406f-8e56-694f435154a4 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0302MB2686 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org action m_connmark returns error messages identifying itself as the 'simple' action instead of 'connmark' action. e.g. tc filter add dev eth0 protocol all u32 match u32 0 0 flowid 1:1 \ action connmark index wrong simple: Illegal "index" bad action parsing parse_action: bad value (3:connmark)! Illegal "action" In what is most likely a copy/paste error from the simple action example code, fix connmark error messages to identify themselves as coming from connmark. tc filter add dev eth0 protocol all u32 match u32 0 0 flowid 1:1 \ action connmark index wrong connmark: Illegal "index" bad action parsing parse_action: bad value (3:connmark)! Illegal "action" While we're here also fixup the 'Illegal "Zone"' error code to say 'Illegal "zone"' instead of 'Illegal "index"' Signed-off-by: Kevin Darbyshire-Bryant --- tc/m_connmark.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tc/m_connmark.c b/tc/m_connmark.c index 45e2d05f..13543d33 100644 --- a/tc/m_connmark.c +++ b/tc/m_connmark.c @@ -73,7 +73,7 @@ parse_connmark(struct action_util *a, int *argc_p, char ***argv_p, int tca_id, if (matches(*argv, "zone") == 0) { NEXT_ARG(); if (get_u16(&sel.zone, *argv, 10)) { - fprintf(stderr, "simple: Illegal \"index\"\n"); + fprintf(stderr, "connmark: Illegal \"zone\"\n"); return -1; } argc--; @@ -87,7 +87,7 @@ parse_connmark(struct action_util *a, int *argc_p, char ***argv_p, int tca_id, if (matches(*argv, "index") == 0) { NEXT_ARG(); if (get_u32(&sel.index, *argv, 10)) { - fprintf(stderr, "simple: Illegal \"index\"\n"); + fprintf(stderr, "connmark: Illegal \"index\"\n"); return -1; } argc--;