Skip to contentSkip to conversation

Comments on iptstate

DISCUSSION Harald Welte 2 participants 4 messages Feb 15, 2004 – Feb 16, 2004 netfilter

lore
Share & tools
lore
#0 lore raw

Hi!

I recently found out about your tool 'iptstate'.

First of all, I think it serves a good purpose, and it is definitely something that netfilter/iptables users need.

However, two comments:

1) reading /proc/net/ip_conntrack is currently (still) racy on SMP boxes. This means it cannot be used as reliable source.

2) reading /proc/net/ip_conntrack has a huge impact on the performance of the conntrack system

It would be fine if you could inform your users about those issues. Feel free to blame the netfilter/iptables developers, since it's our fault to offer such a broken interface in the first place.

I suggest to consider porting your application on top of ctnetlink (see libctnetlink in netfilter cvs and the nfnetlink-ctnetlink patch in patch-o-matic).

3) The name of the application is misleading. iptables itself does not track any state information. it is ip_conntrack who does. There is almost no relation between both of them.

Thanks for your attention,

Signature · 5 lines
- Harald Welte <[email protected]>             http://www.netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie
#1 lore raw
Quoted 6 lines · Harald Welte

Hi!

I recently found out about your tool 'iptstate'.

First of all, I think it serves a good purpose, and it is definitely something that netfilter/iptables users need.

Thanks. I post new version the the netfilter mailing list...

Quoted 2 lines

1) reading /proc/net/ip_conntrack is currently (still) racy on SMP boxes. This means it cannot be used as reliable source.

I didn't know that. I'll put it in the docs of the next version. Thanks for the heads up.

Quoted 2 lines

2) reading /proc/net/ip_conntrack has a huge impact on the performance of the conntrack system

Really? Also good to know.

Quoted 3 lines

It would be fine if you could inform your users about those issues. Feel free to blame the netfilter/iptables developers, since it's our fault to offer such a broken interface in the first place.

Will do! =)

Quoted 3 lines

I suggest to consider porting your application on top of ctnetlink (see libctnetlink in netfilter cvs and the nfnetlink-ctnetlink patch in patch-o-matic).

I might just do that. Do those libraries have hooks to do things like.. um, say remove a state from the state table? Its a commonly requested feature of iptstate.

Quoted 3 lines

3) The name of the application is misleading. iptables itself does not track any state information. it is ip_conntrack who does. There is almost no relation between both of them.

Sorry, but there's no way I'm renaming my app. =) I don't think its THAT misleading. ip_conntrack is an ip tables module. It's not some application that sits on top of any firewall, its very ip tables specific. It makes ip tables have stateful capabilities.

Quoted 1 line

Thanks for your attention,

Thanks for your comments!

Signature · 7 lines
Phil Dibowitz                             [email protected]
Freeware and Technical Pages              Insanity Palace of Metallica
http://www.phildev.net/                   http://www.ipom.com/

"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
 - Benjamin Franklin, 1759
#2 lore raw
Quoted 7 lines · Phil Dibowitz
Quoted 3 lines

I suggest to consider porting your application on top of ctnetlink (see libctnetlink in netfilter cvs and the nfnetlink-ctnetlink patch in patch-o-matic).

I might just do that. Do those libraries have hooks to do things like.. um, say remove a state from the state table? Its a commonly requested feature of iptstate.

yes, exactly. that is possible using ctnetlink

Quoted 9 lines
Quoted 3 lines

3) The name of the application is misleading. iptables itself does not track any state information. it is ip_conntrack who does. There is almost no relation between both of them.

Sorry, but there's no way I'm renaming my app. =) I don't think its THAT misleading. ip_conntrack is an ip tables module. It's not some application that sits on top of any firewall, its very ip tables specific. It makes ip tables have stateful capabilities.

I didn't ask you to rename it, I just wanted to point that out.

Is is _NOT_ an iptables module, it is a netfilter module. Thus it is a sibling descending from the same father (netfilter). But technically, they have nothing in common at all (rather than using the netfilter API to receive packets, but a lot of people do that now).

It makes the network stack have state tracking. That iptables is almost it's only user is just a coincidence.

Quoted 1 line

Phil Dibowitz [email protected]

Signature · 5 lines
- Harald Welte <[email protected]>             http://www.netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie
#3 lore raw
Quoted 1 line · Harald Welte

yes, exactly. that is possible using ctnetlink

OK. I'll look into a re-write. Perhaps it will give me a reason to change the major version number. =)

Quoted 1 line

I didn't ask you to rename it, I just wanted to point that out.

OK. Just checking. =) Thanks for the info.

Signature · 7 lines
Phil Dibowitz                             [email protected]
Freeware and Technical Pages              Insanity Palace of Metallica
http://www.phildev.net/                   http://www.ipom.com/

"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
 - Benjamin Franklin, 1759