1Checksum action in tc(8) Linux Checksum action in tc(8)
2
3
4
6 csum - checksum update action
7
9 tc ... action csum UPDATE
10
11 UPDATE := TARGET [ UPDATE ]
12
13 TARGET := { ip4h | icmp | igmp | tcp | udp | udplite | sctp | SWEETS }
14
15 SWEETS := { and | or | + }
16
18 The csum action triggers checksum recalculation of specified packet
19 headers. It is commonly used to fix incorrect checksums after the pedit
20 action has modified the packet content.
21
23 TARGET Specify which headers to update: IPv4 header (ip4h), ICMP header
24 (icmp), IGMP header (igmp), TCP header (tcp), UDP header (udp),
25 UDPLite header (udplite) or SCTP header (sctp).
26
27 SWEETS These are merely syntactic sugar and ignored internally.
28
30 The following performs stateless NAT for incoming packets from
31 192.0.2.100 to new destination 198.51.100.1. Assuming these are UDP
32 packets, both IP and UDP checksums have to be recalculated:
33
34 # tc qdisc add dev eth0 ingress handle ffff:
35 # tc filter add dev eth0 prio 1 protocol ip parent ffff: \
36 u32 match ip src 192.0.2.100/32 flowid :1 \
37 action pedit munge ip dst set 198.51.100.1 pipe \
38 csum ip and udp
39
40
42 tc(8), tc-pedit(8)
43
44
45
46iproute2 11 Jan 2015 Checksum action in tc(8)