RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1468280 - TestOnly: TC pedit action: Support offset relative to L2 and L4
Summary: TestOnly: TC pedit action: Support offset relative to L2 and L4
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: iproute
Version: 7.5
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Phil Sutter
QA Contact: Jaroslav Aster
Ioanna Gkioka
URL:
Whiteboard:
Depends On: 1435647
Blocks: 1470965
TreeView+ depends on / blocked
 
Reported: 2017-07-06 14:42 UTC by Simon Horman
Modified: 2018-04-10 14:30 UTC (History)
9 users (show)

Fixed In Version: iproute-4.11.0-5.el7
Doc Type: Enhancement
Doc Text:
The `tc-pedit` action now supports "offset" relative to Layer `2` and Layer `4` The `tc-pedit` action allows modification of packet data. This update adds support for specifying the "offset" options relative to the Layer `2`, `3` and `4` headers to `tc-pedit`. This makes `pedit header` handling more robust and flexible. As a result, editing Ethernet header is more convenient and accessing the Layer `4` header works independently to the Layer `3` header size.
Clone Of:
Environment:
Last Closed: 2018-04-10 14:28:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:0815 0 None None None 2018-04-10 14:30:42 UTC

Description Simon Horman 2017-07-06 14:42:42 UTC
Preface:

The intention of this bug is to provide insight into a feature proposed by Netronome for inclusion in RHEL 7.5.

Description:

Pedit allows modification of packet data. Historically this has been done
relative to an offset from the start of the L3 header with a negative offset used to modify the L2 header. This is, however, not robust in the presence of variable length headers.

Status:

To alleviate this problem pedit has been updated to allow offsets relative to the start of L2 and L4 headers. This is provided by the following upstream patch which was included in v4.11.

7c71a40cbd31 ("tc/pedit: Extend pedit to specify offset relative to mac/transport headers")

The following patches build on the above to provide helper-type facilities to allow easier use by users. They are also included in v4.11.

3d2a7781ec0b ("tc/pedit: p_udp: introduce pedit udp support")
2c6eb12ab825 ("tc/pedit: p_tcp: introduce pedit tcp support")
3cd5149ecd78 ("tc/pedit: p_eth: ETH header editor")
fa4652ff3b5d ("tc/pedit: Support fields bigger than 32 bits")
8d193d96074b ("tc/pedit: p_ip: introduce editing ttl header")

The above patches relate to a new kernel feature introduced in v4.11 and described in BZ1468278. The kernel feature may be used independently of the user-space updates described here. And the user-space updates described here are expected to be independent of use of this feature in conjunction with OvS.

Comment 5 Jaroslav Aster 2017-12-04 15:52:47 UTC
Hi Phil,

I suppose this bug was fixed by re-base, so I can't review patches and find out what has been changed :-).

Could you please send me some example, old and new way?

I read examples, but I'm not sure, how to test it. Thanks.

Comment 6 Phil Sutter 2017-12-05 19:59:16 UTC
Hi Jaroslav,

(In reply to Jaroslav Aster from comment #5)
> I suppose this bug was fixed by re-base, so I can't review patches and find
> out what has been changed :-).

Yes, it was. Hence why it is TestOnly.

> Could you please send me some example, old and new way?
> 
> I read examples, but I'm not sure, how to test it. Thanks.

It is all about 'ex' flag in pedit arguments. The example shown in tc-pedit.8 suits quite well - it performs destination port redirection.

Old style:

# tc filter add dev eth0 parent 1: u32 \
     match ip dport 23 0xffff \
     action pedit munge ip dport set 22

New style:

# tc filter add dev eth0 parent 1: u32 \
     match ip dport 23 0xffff \
     action pedit ex munge tcp dport set 22

Both of the above commands will redirect TCP packets with destination port 23
to destination port 22. The difference is that old style also matches UDP and
breaks if IP header options are present.

Cheers, Phil

Comment 7 Jaroslav Aster 2018-01-16 15:30:57 UTC
Hi Phil,

thank you for your update. My original point was, I would like to be sure that without using ex param everything is the same for users as was before update, no broken scripts because start point of offset is different. I can't test every possibilities :-).

Comment 8 Phil Sutter 2018-01-17 17:12:56 UTC
Hi Jaroslav,

(In reply to Jaroslav Aster from comment #7)
> thank you for your update. My original point was, I would like to be sure
> that without using ex param everything is the same for users as was before
> update, no broken scripts because start point of offset is different. I
> can't test every possibilities :-).

So does my answer help you with that or do you need any further information? I think the old syntax should continue to work just as before. If it doesn't, we have a bug. :)

Cheers, Phil

Comment 9 Jaroslav Aster 2018-02-21 15:15:14 UTC
Hi Phil,

it helped. I just needed information that old syntax has not been changed. Thanks.

Comment 13 errata-xmlrpc 2018-04-10 14:28:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2018:0815


Note You need to log in before you can comment on or make changes to this bug.