From patchwork Mon Feb 15 11:51:01 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jamal X-Patchwork-Id: 45355 X-Patchwork-Delegate: shemminger@vyatta.com Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 74923B7CB8 for ; Mon, 15 Feb 2010 22:51:21 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755424Ab0BOLvH (ORCPT ); Mon, 15 Feb 2010 06:51:07 -0500 Received: from mail-qy0-f200.google.com ([209.85.221.200]:47463 "EHLO mail-qy0-f200.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755294Ab0BOLvF (ORCPT ); Mon, 15 Feb 2010 06:51:05 -0500 Received: by qyk38 with SMTP id 38so149004qyk.1 for ; Mon, 15 Feb 2010 03:51:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:subject:from:reply-to :to:cc:content-type:date:message-id:mime-version:x-mailer; bh=GcZ5QXn1DLKkTiA2wUHoYjCV6NUxZu1w6aIK+eYTVGE=; b=Rtr3iBGYl49s99bjvPJvKBn5Lh1S9IexJSN2GPJclTCsoA+cLviXUQNi2P4bgZDpwc tYFAKOfS2ILaEc3AIaI0itcL82LNs7U5KA1aBEUHqkf8yD1utKEHZ6HrAEhGZwuy4ox8 blFI55cXE5q4uaV6DRTbGhZCQfhUKBSAx62bA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:subject:from:reply-to:to:cc:content-type:date:message-id :mime-version:x-mailer; b=LTSNOr7/KLpiDan0QIGlunPN6EXGo/JjD1jDJgLf3WhK2zvzbb3QFpXSB+5AB0CRLi xPpuvGRnZB5F2twoa+oDYDS0LWiaqQkJ4xen7b/NG06GtLhx7kCudVGlDyfW0CdQd2LB 3yC+vTeZaLvSAsyp/zBTYI0EMT4SB/invnUkQ= Received: by 10.224.117.204 with SMTP id s12mr2389960qaq.63.1266234662635; Mon, 15 Feb 2010 03:51:02 -0800 (PST) Received: from ?10.0.0.26? (CPE0030ab124d2f-CM001bd7a7f1a0.cpe.net.cable.rogers.com [99.240.66.42]) by mx.google.com with ESMTPS id 7sm17501408qwf.54.2010.02.15.03.51.01 (version=SSLv3 cipher=RC4-MD5); Mon, 15 Feb 2010 03:51:02 -0800 (PST) Subject: [PATCH iproute2]: skbedit: use get_u32 for parsing mark From: jamal Reply-To: hadi@cyberus.ca To: Stephen Hemminger Cc: netdev@vger.kernel.org, Alexander Duyck Date: Mon, 15 Feb 2010 06:51:01 -0500 Message-Id: <1266234661.6776.82.camel@bigi> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org parsing a mark as a classid allows for acceptance of strange informal input. cheers, jamal commit aad0da6507ff8a95a63ed8e529c05f52be5b0e75 Author: Jamal Hadi Salim Date: Mon Feb 15 06:45:29 2010 -0500 skbedit: use get_u32 for parsing mark get_u32 is the more appropriate parser for a mark. Signed-off-by: Jamal Hadi Salim diff --git a/tc/m_skbedit.c b/tc/m_skbedit.c index 5d1a96a..990b9c7 100644 --- a/tc/m_skbedit.c +++ b/tc/m_skbedit.c @@ -86,7 +86,7 @@ parse_skbedit(struct action_util *a, int *argc_p, char ***argv_p, int tca_id, } else if (matches(*argv, "mark") == 0) { flags |= SKBEDIT_F_MARK; NEXT_ARG(); - if (get_tc_classid(&mark, *argv)) { + if (get_u32(&mark, *argv, 0)) { fprintf(stderr, "Illegal mark\n"); return -1; }