1 This module sets the netfilter mark value associated with a connection.
3 \fB--set-xmark\fR \fIvalue\fR[\fB/\fR\fImask\fR]
4 Zero out the bits given by \fImask\fR and XOR \fIvalue\fR into the ctmark.
6 \fB--save-mark\fR [\fB--nfmask\fR \fInfmask\fR] [\fB--ctmask\fR \fIctmask\fR]
7 Copy the packet mark (nfmark) to the connection mark (ctmark) using the given
8 masks. The new nfmark value is determined as follows:
10 ctmark = (ctmark & ~ctmask) ^ (nfmark & nfmask)
12 i.e. \fIctmask\fR defines what bits to clear and \fInfmask\fR what bits of the
13 nfmark to XOR into the ctmark. \fIctmask\fR and \fInfmask\fR default to
16 \fB--restore-mark\fR [\fB--nfmask\fR \fInfmask\fR] [\fB--ctmask\fR \fIctmask\fR]
17 Copy the connection mark (ctmark) to the packet mark (nfmark) using the given
18 masks. The new ctmark value is determined as follows:
20 nfmark = (nfmark & ~\fInfmask\fR) ^ (ctmark & \fIctmask\fR);
22 i.e. \fInfmask\fR defines what bits to clear and \fIctmask\fR what bits of the
23 ctmark to XOR into the nfmark. \fIctmask\fR and \fInfmask\fR default to
26 \fB--restore-mark\fR is only valid in the \fBmangle\fR table.
28 The following mnemonics are available for \fB--set-xmark\fR:
30 \fB--and-mark\fR \fIbits\fR
31 Binary AND the ctmark with \fIbits\fR. (Mnemonic for \fB--set-xmark
32 0/\fR\fIinvbits\fR, where \fIinvbits\fR is the binary negation of \fIbits\fR.)
34 \fB--or-mark\fR \fIbits\fR
35 Binary OR the ctmark with \fIbits\fR. (Mnemonic for \fB--set-xmark\fR
36 \fIbits\fR\fB/\fR\fIbits\fR.)
38 \fB--xor-mark\fR \fIbits\fR
39 Binary XOR the ctmark with \fIbits\fR. (Mnemonic for \fB--set-xmark\fR
42 \fB--set-mark\fR \fIvalue\fR[\fB/\fR\fImask\fR]
43 Set the connection mark. If a mask is specified then only those bits set in the
46 \fB--save-mark\fR [\fB--mask\fR \fImask\fR]
47 Copy the nfmark to the ctmark. If a mask is specified, only those bits are
50 \fB--restore-mark\fR [\fB--mask\fR \fImask\fR]
51 Copy the ctmark to the nfmark. If a mask is specified, only those bits are
52 copied. This is only valid in the \fBmangle\fR table.