Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: iptables: Devel

conntrack module problems resolved

 

 

iptables devel RSS feed   Index | Next | Previous | View Threaded


sshore at escape

Jul 30, 2001, 8:46 PM

Post #1 of 1 (430 views)
Permalink
conntrack module problems resolved

I finally figured out why the module was working.

Original code:
icq.tuple.dst.u.udp.port = htons(ICQ_PORT);
icq.tuple.dst.protonum = IPPROTO_UDP;
icq.mask.dst.u.udp.port = 0xffff;
icq.mask.dst.protonum = 0xffff;

Makes sense, right? I want all udp packets going to port 4000. But it
turns out that this works instead:

icq.tuple.src.u.udp.port = htons(ICQ_PORT);
icq.tuple.dst.protonum = IPPROTO_UDP;
icq.mask.src.u.udp.port = 0xffff;
icq.mask.dst.protonum = 0xffff;

Now, can anyone explain why the second example works, but the first
doesn't? I'd think setting the dst port in the tuple would give packets
with destination port desired. How are tuples interpreted in this context?


Scottie Shore <sshore [at] escape>
"Experience is that marvelous thing that enables you to recognize
a mistake when you make it again." -- F. P. Jones

iptables devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.