]> git.proxmox.com Git - mirror_iproute2.git/commit - tc/p_udp.c
tc/pedit: Extend pedit to specify offset relative to mac/transport headers
authorAmir Vadai <amir@vadai.me>
Sun, 23 Apr 2017 12:53:50 +0000 (15:53 +0300)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 1 May 2017 16:22:16 +0000 (09:22 -0700)
commit7c71a40cbd3180a64a5fb997fa3efba3335c7002
tree77a001b8ff9bbc46c30f712d453eaee15b1b6aa4
parent51536ebbe869fe029d36c869677d0d2310f45eee
tc/pedit: Extend pedit to specify offset relative to mac/transport headers

Utilize the extended pedit netlink to set an offset relative to a
specific header type. Old netlink only enabled the user to set
approximated  offset relative to the IPv4 header.

To use this extended functionality need to use the 'ex' keyword after
'pedit' and before any 'munge'.
e.g:
$ tc filter add dev ens9 protocol ip parent ffff: \
    flower \
      ip_proto udp \
      dst_port 80 \
    action pedit ex munge \
      ip dst set 1.1.1.1 \
      pipe \
    action mirred egress redirect dev veth0

Signed-off-by: Amir Vadai <amir@vadai.me>
man/man8/tc-pedit.8
tc/m_pedit.c
tc/m_pedit.h
tc/p_icmp.c
tc/p_ip.c
tc/p_tcp.c
tc/p_udp.c