Netdev List
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: Stephen Hemminger <shemming@brocade.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>, netdev@vger.kernel.org
Subject: [iproute PATCH v2 3/4] tc: pedit: Fix raw op
Date: Tue, 22 Mar 2016 15:16:23 +0100	[thread overview]
Message-ID: <1458656184-22154-4-git-send-email-phil@nwl.cc> (raw)
In-Reply-To: <1458656184-22154-1-git-send-email-phil@nwl.cc>

The retain value was wrong for u16 and u8 types.

Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 tc/m_pedit.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tc/m_pedit.c b/tc/m_pedit.c
index 30a6f3673e896..8ccec8bc4a99f 100644
--- a/tc/m_pedit.c
+++ b/tc/m_pedit.c
@@ -339,12 +339,12 @@ parse_offset(int *argc_p, char ***argv_p, struct tc_pedit_sel *sel, struct tc_pe
 	}
 	if (matches(*argv, "u16") == 0) {
 		len = 2;
-		retain = 0x0;
+		retain = 0xffff;
 		goto done;
 	}
 	if (matches(*argv, "u8") == 0) {
 		len = 1;
-		retain = 0x0;
+		retain = 0xff;
 		goto done;
 	}
 
-- 
2.7.2

  parent reply	other threads:[~2016-03-22 14:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-22 14:16 [iproute PATCH v2 0/4] tc: pedit: further fixes Phil Sutter
2016-03-22 14:16 ` [iproute PATCH v2 1/4] tc/p_ip.c: Minor coding style cleanup Phil Sutter
2016-03-22 14:16 ` [iproute PATCH v2 2/4] tc: pedit: Fix for big-endian systems Phil Sutter
2016-03-22 14:16 ` Phil Sutter [this message]
2016-03-22 14:16 ` [iproute PATCH v2 4/4] testsuite: add a test for tc pedit action Phil Sutter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1458656184-22154-4-git-send-email-phil@nwl.cc \
    --to=phil@nwl.cc \
    --cc=jhs@mojatatu.com \
    --cc=netdev@vger.kernel.org \
    --cc=shemming@brocade.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox