blob: 7bb05bed7d3901f1304823bbe8b23011df0210de [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001This target is used to set the Netfilter mark value associated with the packet.
2The target can only be used in the \fBmangle\fR table. It can, for example, be
3used in conjunction with routing based on fwmark (needs iproute2).
4.TP
5\fB\-\-set\-xmark\fP \fIvalue\fP[\fB/\fP\fImask\fP]
6Zeroes out the bits given by \fImask\fR and XORs \fIvalue\fR into the packet
7mark ("nfmark"). If \fImask\fR is omitted, 0xFFFFFFFF is assumed.
8.TP
9\fB\-\-set\-mark\fP \fIvalue\fP[\fB/\fP\fImask\fP]
10Zeroes out the bits given by \fImask\fR and ORs \fIvalue\fR into the packet
11mark. If \fImask\fR is omitted, 0xFFFFFFFF is assumed.
12.PP
13The following mnemonics are available:
14.TP
15\fB\-\-and\-mark\fP \fIbits\fP
16Binary AND the nfmark with \fIbits\fR. (Mnemonic for \fB\-\-set\-xmark
170/\fR\fIinvbits\fR, where \fIinvbits\fR is the binary negation of \fIbits\fR.)
18.TP
19\fB\-\-or\-mark\fP \fIbits\fP
20Binary OR the nfmark with \fIbits\fR. (Mnemonic for \fB\-\-set\-xmark\fP
21\fIbits\fR\fB/\fR\fIbits\fR.)
22.TP
23\fB\-\-xor\-mark\fP \fIbits\fP
24Binary XOR the nfmark with \fIbits\fR. (Mnemonic for \fB\-\-set\-xmark\fP
25\fIbits\fR\fB/0\fR.)