netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [rfc] using xor in mark targets
@ 2007-11-29 22:50 Jan Engelhardt
  2007-11-29 23:27 ` Patrick McHardy
  0 siblings, 1 reply; 12+ messages in thread
From: Jan Engelhardt @ 2007-11-29 22:50 UTC (permalink / raw)
  To: Netfilter Developer Mailing List

Hi,


the usual MARK targets all have something like:

	newmark = (oldmark & ~mask) | newmark;

in Fall 2007's tproxy patches, the following is used instead:

	newmark = (oldmark & ~mask) ^ newmark;

this puzzled me at first but looks well-thought. The new xt_TOS
already uses the XOR variant, to get that extra bit of expressive
power[1].

I would have liked to do the same for MARK, but I suspect it is not
quite backwards-compatible with respect to user scripts and
iptables-save output. So what could be done?
	* -j MARK2 --set-mark 0x81/0x7F
	* -j MARK --set-mark-v2 0x81/0x7F
other ideas, thoughts, criticism?


[1] http://www.spinics.net/lists/netfilter-devel/msg00050.html

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2007-12-04 14:08 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-29 22:50 [rfc] using xor in mark targets Jan Engelhardt
2007-11-29 23:27 ` Patrick McHardy
2007-12-03 15:03   ` Jan Engelhardt
2007-12-03 15:09     ` Patrick McHardy
2007-12-03 17:35       ` Jan Engelhardt
2007-12-04  8:11         ` Patrick McHardy
2007-12-04  8:54           ` Jan Engelhardt
2007-12-04  9:17             ` Patrick McHardy
2007-12-04 10:52               ` Jan Engelhardt
2007-12-04 10:54                 ` Patrick McHardy
2007-12-04 14:05                   ` Jan Engelhardt
2007-12-04 14:08                     ` Patrick McHardy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).