man-pages/man8/tc-csum.8.html
2021-03-31 01:06:50 +01:00

145 lines
2.7 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of Checksum action in tc</TITLE>
</HEAD><BODY>
<H1>Checksum action in tc</H1>
Section: Linux (8)<BR>Updated: 11 Jan 2015<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<P>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
csum - checksum update action
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<BR>
<B>tc</B> ... <B>action csum</B>
<I>UPDATE</I>
<P>
<BR>
<I>UPDATE</I> := <I>TARGET</I> [ <I>UPDATE</I> ]
<P>
<BR>
<I>TARGET</I> := {
<B>ip4h</B> |
<B>icmp</B> |
<B>igmp</B> |
<B>tcp</B> |
<B>udp</B> |
<B>udplite</B> |
<B>sctp</B> |
<I>SWEETS</I> }
<P>
<BR>
<I>SWEETS</I> := {
<B>and</B> | <B>or</B> | <B>+</B> }
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
The
<B>csum</B>
action triggers checksum recalculation of specified packet headers. It is
commonly used to fix incorrect checksums after the
<B>pedit</B>
action has modified the packet content.
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<DL COMPACT>
<DT id="1"><I>TARGET</I>
<DD>
Specify which headers to update: IPv4 header
(<B>ip4h</B>),
ICMP header
(<B>icmp</B>),
IGMP header
(<B>igmp</B>),
TCP header
(<B>tcp</B>),
UDP header
(<B>udp</B>),
UDPLite header
(<B>udplite</B>) or
SCTP header
(<B>sctp</B>).
<DT id="2"><B>SWEETS</B>
<DD>
These are merely syntactic sugar and ignored internally.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>EXAMPLES</H2>
The following performs stateless NAT for incoming packets from 192.0.2.100 to
new destination 198.51.100.1. Assuming these are UDP
packets, both IP and UDP checksums have to be recalculated:
<P>
<DL COMPACT><DT id="3"><DD>
# tc qdisc add dev eth0 ingress handle ffff:
# tc filter add dev eth0 prio 1 protocol ip parent ffff: \
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT>u32 match ip src 192.0.2.100/32 flowid :1 \<BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT>action pedit munge ip dst set 198.51.100.1 pipe \<BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT>csum ip and udp<BR>
</DL>
<P>
<A NAME="lbAG">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?8+tc">tc</A></B>(8),
<B><A HREF="/cgi-bin/man/man2html?8+tc-pedit">tc-pedit</A></B>(8)
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="4"><A HREF="#lbAB">NAME</A><DD>
<DT id="5"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="6"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="7"><A HREF="#lbAE">OPTIONS</A><DD>
<DT id="8"><A HREF="#lbAF">EXAMPLES</A><DD>
<DT id="9"><A HREF="#lbAG">SEE ALSO</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:06:17 GMT, March 31, 2021
</BODY>
</HTML>