All of lore.kernel.org
 help / color / mirror / Atom feed
* CONNMARK save-mark and restore-mark not working ?
@ 2005-02-18  8:40 Ian! D. Allen
  2005-02-18 10:56 ` Omar Garcia
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ian! D. Allen @ 2005-02-18  8:40 UTC (permalink / raw)
  To: netfilter

I think this pair (marking connections with "9"):

    iptables -t mangle -A OUTPUT -j MARK --set-mark 9
    iptables -t mangle -A OUTPUT -j CONNMARK --set-mark 9

should be equivalent to this pair:

    iptables -t mangle -A OUTPUT -j MARK --set-mark 9
    iptables -t mangle -A OUTPUT -j CONNMARK --save-mark

The first pair works - I get mark=9 entries in /proc/net/ip_conntrack .
The second pair does not - I get no marks at all in ip_conntrack.

I think this pair should set packet marks from the ip_conntrack marks:

    iptables -t mangle -A OUTPUT -j CONNMARK --set-mark 9
    iptables -t mangle -A OUTPUT -j CONNMARK --restore-mark

It does not - the packets aren't marked:

Chain OUTPUT (policy ACCEPT 2989 packets, 395K bytes)
 pkts bytes target     prot opt in     out     source               destination         
 1695  178K CONNMARK   all  --  *      *       0.0.0.0/0            0.0.0.0/0           CONNMARK set 0x9 
 1695  178K CONNMARK   all  --  *      *       0.0.0.0/0            0.0.0.0/0           CONNMARK restore 
    0     0 LOG        all  --  *      *       0.0.0.0/0            0.0.0.0/0           MARK match 0x9 LOG flags 1 level 7 prefix `IDAMARK ' 
 1695  178K            all  --  *      *       0.0.0.0/0            0.0.0.0/0           MARK match 0x0

What am I missing?

Linux elm 2.6.10-1mdk #2 Sat Jan 29 13:10:11 EST
2005 i686 AMD Athlon(tm) XP 3200+ unknown GNU/Linux

-- 
-IAN!  Ian! D. Allen   Ottawa, Ontario, Canada
       EMail: idallen@idallen.ca   WWW: http://www.idallen.com/
       College professor (Linux) via: http://teaching.idallen.com/
       Support free and open public digital rights:  http://eff.org/


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

end of thread, other threads:[~2005-02-20 22:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-18  8:40 CONNMARK save-mark and restore-mark not working ? Ian! D. Allen
2005-02-18 10:56 ` Omar Garcia
2005-02-18 21:37   ` Ian! D. Allen
2005-02-18 11:05 ` Vinod Chandran
2005-02-18 21:32   ` Ian! D. Allen
2005-02-20 22:35 ` Ian! D. Allen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.