csum(8) — Linux manual page


Checksum action in tc(8)            Linux           Checksum action in tc(8)

NAME         top

       csum - checksum update action

SYNOPSIS         top

       tc ... action csum UPDATE


       TARGET := { ip4h | icmp | igmp | tcp | udp | udplite | sctp | SWEETS

       SWEETS := { and | or | + }

DESCRIPTION         top

       The csum action triggers checksum recalculation of specified packet
       headers. It is commonly used to fix incorrect checksums after the
       pedit action has modified the packet content.

OPTIONS         top

       TARGET Specify which headers to update: IPv4 header (ip4h), ICMP
              header (icmp), IGMP header (igmp), TCP header (tcp), UDP
              header (udp), UDPLite header (udplite) or SCTP header (sctp).

       SWEETS These are merely syntactic sugar and ignored internally.

EXAMPLES         top

       The following performs stateless NAT for incoming packets from to new destination Assuming these are UDP
       packets, both IP and UDP checksums have to be recalculated:

              # tc qdisc add dev eth0 ingress handle ffff:
              # tc filter add dev eth0 prio 1 protocol ip parent ffff: \
                   u32 match ip src flowid :1 \
                   action pedit munge ip dst set pipe \
                   csum ip and udp

SEE ALSO         top

       tc(8), tc-pedit(8)

COLOPHON         top

       This page is part of the iproute2 (utilities for controlling TCP/IP
       networking and traffic) project.  Information about the project can
       be found at 
       If you have a bug report for this manual page, send it to
       netdev@vger.kernel.org, shemminger@osdl.org.  This page was obtained
       from the project's upstream Git repository
       ⟨https://git.kernel.org/pub/scm/network/iproute2/iproute2.git⟩ on
       2020-08-13.  (At that time, the date of the most recent commit that
       was found in the repository was 2020-06-24.)  If you discover any
       rendering problems in this HTML version of the page, or you believe
       there is a better or more up-to-date source for the page, or you have
       corrections or improvements to the information in this COLOPHON
       (which is not part of the original manual page), send a mail to

iproute2                         11 Jan 2015        Checksum action in tc(8)