blob: 7bb05bed7d3901f1304823bbe8b23011df0210de [file] [log] [blame]
Jan Engelhardtf4b737f2008-01-20 13:31:13 +00001This 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
Jan Engelhardtfea74bf2009-01-12 04:53:18 +01005\fB\-\-set\-xmark\fP \fIvalue\fP[\fB/\fP\fImask\fP]
Jan Engelhardtf4b737f2008-01-20 13:31:13 +00006Zeroes 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
Jan Engelhardtfea74bf2009-01-12 04:53:18 +01009\fB\-\-set\-mark\fP \fIvalue\fP[\fB/\fP\fImask\fP]
Jan Engelhardtf4b737f2008-01-20 13:31:13 +000010Zeroes 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
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010015\fB\-\-and\-mark\fP \fIbits\fP
16Binary AND the nfmark with \fIbits\fR. (Mnemonic for \fB\-\-set\-xmark
Jan Engelhardtf4b737f2008-01-20 13:31:13 +0000170/\fR\fIinvbits\fR, where \fIinvbits\fR is the binary negation of \fIbits\fR.)
18.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010019\fB\-\-or\-mark\fP \fIbits\fP
20Binary OR the nfmark with \fIbits\fR. (Mnemonic for \fB\-\-set\-xmark\fP
Jan Engelhardtf4b737f2008-01-20 13:31:13 +000021\fIbits\fR\fB/\fR\fIbits\fR.)
22.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010023\fB\-\-xor\-mark\fP \fIbits\fP
24Binary XOR the nfmark with \fIbits\fR. (Mnemonic for \fB\-\-set\-xmark\fP
Jan Engelhardtf4b737f2008-01-20 13:31:13 +000025\fIbits\fR\fB/0\fR.)