blob: 712fb76f7340c3a23f28df1c906f8c74e37fec09 [file] [log] [blame]
Jan Engelhardtf4b737f2008-01-20 13:31:13 +00001This target is used to set the Netfilter mark value associated with the packet.
Jan Engelhardtc9be7f12010-03-16 20:28:30 +01002It can, for example, be used in conjunction with routing based on fwmark (needs
3iproute2). If you plan on doing so, note that the mark needs to be set in the
4PREROUTING chain of the mangle table to affect routing.
5The mark field is 32 bits wide.
Jan Engelhardtf4b737f2008-01-20 13:31:13 +00006.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +01007\fB\-\-set\-xmark\fP \fIvalue\fP[\fB/\fP\fImask\fP]
Jan Engelhardtc6775d62010-07-23 21:23:05 +02008Zeroes out the bits given by \fImask\fP and XORs \fIvalue\fP into the packet
9mark ("nfmark"). If \fImask\fP is omitted, 0xFFFFFFFF is assumed.
Jan Engelhardtf4b737f2008-01-20 13:31:13 +000010.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010011\fB\-\-set\-mark\fP \fIvalue\fP[\fB/\fP\fImask\fP]
Jan Engelhardtc6775d62010-07-23 21:23:05 +020012Zeroes out the bits given by \fImask\fP and ORs \fIvalue\fP into the packet
13mark. If \fImask\fP is omitted, 0xFFFFFFFF is assumed.
Jan Engelhardtf4b737f2008-01-20 13:31:13 +000014.PP
15The following mnemonics are available:
16.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010017\fB\-\-and\-mark\fP \fIbits\fP
Jan Engelhardtc6775d62010-07-23 21:23:05 +020018Binary AND the nfmark with \fIbits\fP. (Mnemonic for \fB\-\-set\-xmark
190/\fP\fIinvbits\fP, where \fIinvbits\fP is the binary negation of \fIbits\fP.)
Jan Engelhardtf4b737f2008-01-20 13:31:13 +000020.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010021\fB\-\-or\-mark\fP \fIbits\fP
Jan Engelhardtc6775d62010-07-23 21:23:05 +020022Binary OR the nfmark with \fIbits\fP. (Mnemonic for \fB\-\-set\-xmark\fP
23\fIbits\fP\fB/\fP\fIbits\fP.)
Jan Engelhardtf4b737f2008-01-20 13:31:13 +000024.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010025\fB\-\-xor\-mark\fP \fIbits\fP
Jan Engelhardtc6775d62010-07-23 21:23:05 +020026Binary XOR the nfmark with \fIbits\fP. (Mnemonic for \fB\-\-set\-xmark\fP
27\fIbits\fP\fB/0\fP.)