• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1This module sets the netfilter mark value associated with a connection. The
2mark is 32 bits wide.
3.TP
4\fB\-\-set\-xmark\fP \fIvalue\fP[\fB/\fP\fImask\fP]
5Zero out the bits given by \fImask\fP and XOR \fIvalue\fP into the ctmark.
6.TP
7\fB\-\-save\-mark\fP [\fB\-\-nfmask\fP \fInfmask\fP] [\fB\-\-ctmask\fP \fIctmask\fP]
8Copy the packet mark (nfmark) to the connection mark (ctmark) using the given
9masks. The new nfmark value is determined as follows:
10.IP
11ctmark = (ctmark & ~ctmask) ^ (nfmark & nfmask)
12.IP
13i.e. \fIctmask\fP defines what bits to clear and \fInfmask\fP what bits of the
14nfmark to XOR into the ctmark. \fIctmask\fP and \fInfmask\fP default to
150xFFFFFFFF.
16.TP
17\fB\-\-restore\-mark\fP [\fB\-\-nfmask\fP \fInfmask\fP] [\fB\-\-ctmask\fP \fIctmask\fP]
18Copy the connection mark (ctmark) to the packet mark (nfmark) using the given
19masks. The new ctmark value is determined as follows:
20.IP
21nfmark = (nfmark & ~\fInfmask\fP) ^ (ctmark & \fIctmask\fP);
22.IP
23i.e. \fInfmask\fP defines what bits to clear and \fIctmask\fP what bits of the
24ctmark to XOR into the nfmark. \fIctmask\fP and \fInfmask\fP default to
250xFFFFFFFF.
26.IP
27\fB\-\-restore\-mark\fP is only valid in the \fBmangle\fP table.
28.PP
29The following mnemonics are available for \fB\-\-set\-xmark\fP:
30.TP
31\fB\-\-and\-mark\fP \fIbits\fP
32Binary AND the ctmark with \fIbits\fP. (Mnemonic for \fB\-\-set\-xmark
330/\fP\fIinvbits\fP, where \fIinvbits\fP is the binary negation of \fIbits\fP.)
34.TP
35\fB\-\-or\-mark\fP \fIbits\fP
36Binary OR the ctmark with \fIbits\fP. (Mnemonic for \fB\-\-set\-xmark\fP
37\fIbits\fP\fB/\fP\fIbits\fP.)
38.TP
39\fB\-\-xor\-mark\fP \fIbits\fP
40Binary XOR the ctmark with \fIbits\fP. (Mnemonic for \fB\-\-set\-xmark\fP
41\fIbits\fP\fB/0\fP.)
42.TP
43\fB\-\-set\-mark\fP \fIvalue\fP[\fB/\fP\fImask\fP]
44Set the connection mark. If a mask is specified then only those bits set in the
45mask are modified.
46.TP
47\fB\-\-save\-mark\fP [\fB\-\-mask\fP \fImask\fP]
48Copy the nfmark to the ctmark. If a mask is specified, only those bits are
49copied.
50.TP
51\fB\-\-restore\-mark\fP [\fB\-\-mask\fP \fImask\fP]
52Copy the ctmark to the nfmark. If a mask is specified, only those bits are
53copied. This is only valid in the \fBmangle\fP table.
54