TC-pedit man page examples error

4 messages, 2 authors, 2017-07-27 · open the first message on its own page

TC-pedit man page examples error

From: Tyler Bautista <hidden>
Date: 2017-07-25 15:33:41

To whom it may concern,
I recently attempted to use simple tc action pedit commands on the man
page and I ran into some errors. The following is some information
about my version of iproute and my machine:
----------------------------
the following is my iproute package information

Loaded plugins: fastestmirror, langpacks
iproute-3.10.0-74.el7.x86_64
     changed_by = 0
     checksum_data =
f18d9a19e6531081a605086e5003422a87846854a10a306d122b59ff7bebb9d7
     checksum_type = sha256
     command_line = update
     from_repo = base
     from_repo_revision = 1480942829
     from_repo_timestamp = 1480942901
     installed_by = 4294967295
     origin_url =
http://mirror.confluxtech.com/centos/7/os/x86_64/Packages/iproute-3.10.0-74.el7.x86_64.rpm
     reason = user
     releasever = 7
     var_uuid = df8acb3e-a9df-4ffe-b95f-0311b19b2d33
---------------------------------------------------------------------------------
I am running the latest version of Centos 7 with kernel version:

3.10.0-514.26.2.el7.x86_64

-------------
The following are the first three commands of the man page that I run
and their output
---------------------------------------------------------------------------------

tc qdisc replace dev eth0 root handle 1: htb
tc qdisc add dev eth0 ingress handle ffff:
tc filter add dev eth0 parent 1: u32 \
                   match ip dport 23 0xffff \
                   action pedit pedit munge ip dport set 22
bad pedit parsing
Illegal pedit construct (ip)
Usage: ... pedit munge <MUNGE>
Where: MUNGE := <RAW>|<LAYERED>
<RAW>:= <OFFSETC>[ATC]<CMD>
  OFFSETC:= offset <offval> <u8|u16|u32>
  ATC:= at <atval> offmask <maskval> shift <shiftval>
  NOTE: offval is byte offset, must be multiple of 4
  NOTE: maskval is a 32 bit hex number
  NOTE: shiftval is a is a shift value
  CMD:= clear | invert | set <setval>| retain
  <LAYERED>:= ip <ipdata> | ip6 <ip6data>
  | udp <udpdata> | tcp <tcpdata> | icmp <icmpdata>
For Example usage look at the examples directory
bad action parsing
parse_action: bad value (7:pedit)!
Illegal "action"
---------------------------------------------

The first two commands run without error. However the third command fails.

It apparently does not recognize the ip command. This seems strange to
me since the commands I run are on the tc-pedit man page. Any help on
this issue would be appreciated.
Sincerely,

Tyler Bautista

Re: TC-pedit man page examples error

From: Phil Sutter <phil@nwl.cc>
Date: 2017-07-26 08:43:39

Hi Tyler,

On Tue, Jul 25, 2017 at 08:33:40AM -0700, Tyler Bautista wrote:
To whom it may concern,
I recently attempted to use simple tc action pedit commands on the man
page and I ran into some errors. The following is some information
about my version of iproute and my machine:
----------------------------
the following is my iproute package information

Loaded plugins: fastestmirror, langpacks
iproute-3.10.0-74.el7.x86_64
This mailing list is for upstream issues only. Can you reproduce the
problem with vanilla iproute2?

You are using RHEL7's iproute package, which has a number of known
issues in pedit action:

https://bugzilla.redhat.com/show_bug.cgi?id=1322406

These are planned to be resolved for RHEL7.5, not sure when it will land
in CentOS.

Cheers, Phil

Re: TC-pedit man page examples error

From: Tyler Bautista <hidden>
Date: 2017-07-26 16:47:52

Hello Phil,

Thank you for taking my message. I have gotten a solution working so
feel free to ignore the rest of this email. By vanilla iproute2 do you
mean the latest package through the yum or apt repository? All I can
tell you is that in the example I gave the iproute2 package was the
latest one through the RHEL 7 yum repository. Otherwise I will need
clarification on what vanilla means. I attempted the above example
code on two other Ubuntu machines, one of which I can confirm is
Ubuntu 16.04 LTS. Unfortunately I am not at that machine right now so
I cannot give you the output. Both machines gave similar error
messages. The reason I emailed you via netdev was because the example
code I used was taken verbatim from the tc-pedit man page on my
machine. The man page also gave me email addresses to contact in case
an error was found with the man page, which is what I did. I did get
the code to work when using the latest version of iproute2, so I
assume the only practical solution is to manually install the latest
version of iproute2 or wait for the various distros of Linux to use
updated iproute2. I appreciate your help. Have a nice day.

Tyler Bautista

On Wed, Jul 26, 2017 at 1:43 AM, Phil Sutter [off-list ref] wrote:
Hi Tyler,

On Tue, Jul 25, 2017 at 08:33:40AM -0700, Tyler Bautista wrote:
quoted
To whom it may concern,
I recently attempted to use simple tc action pedit commands on the man
page and I ran into some errors. The following is some information
about my version of iproute and my machine:
----------------------------
the following is my iproute package information

Loaded plugins: fastestmirror, langpacks
iproute-3.10.0-74.el7.x86_64
This mailing list is for upstream issues only. Can you reproduce the
problem with vanilla iproute2?

You are using RHEL7's iproute package, which has a number of known
issues in pedit action:

https://bugzilla.redhat.com/show_bug.cgi?id=1322406

These are planned to be resolved for RHEL7.5, not sure when it will land
in CentOS.

Cheers, Phil

Re: TC-pedit man page examples error

From: Phil Sutter <phil@nwl.cc>
Date: 2017-07-27 06:08:09

Hi Tyler,

On Wed, Jul 26, 2017 at 09:47:51AM -0700, Tyler Bautista wrote:
Thank you for taking my message. I have gotten a solution working so
feel free to ignore the rest of this email. By vanilla iproute2 do you
mean the latest package through the yum or apt repository? All I can
tell you is that in the example I gave the iproute2 package was the
latest one through the RHEL 7 yum repository.
'Vanilla' is a widely used term[1], I meant using latest iproute2 from
upstream[2], ideally from Git. You have to report problems with RHEL
packages in Red Hat bugzilla[3].

Cheers, Phil


[1] https://en.wikipedia.org/wiki/Vanilla_software
[2] https://wiki.linuxfoundation.org/networking/iproute2
[3] https://bugzilla.redhat.com/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help