Skip to contentSkip to conversation

Variable-length data?

DISCUSSION Bruce Guenter 2 participants 2 messages Sep 15, 2004 netfilter

lore
Share & tools
lore
#0 lore raw

Greetings.

I have written a simple filter for matching multiple network masks in a list. From what I can see, the actual netfilter data has to be constant sized. Is this true, or is there an easy way to have a non-fixed size list of addresses (for example)? It seems rather wasteful to allocate a large array when only a small one is needed.

Thanks.

Signature · 2 lines
Bruce Guenter <[email protected]> http://em.ca/~bruceg/ http://untroubled.org/
OpenPGP key: 699980E8 / D0B7 C8DD 365D A395 29DA  2E2A E96F B2DC 6999 80E8
#1 lore raw
Quoted 4 lines · Bruce Guenter

I have written a simple filter for matching multiple network masks in a list. From what I can see, the actual netfilter data has to be constant sized. Is this true, or is there an easy way to have a non-fixed size list of addresses (for example)?

iptables matches (and targets) must use a static size matchdata structure per match (or target).

Quoted 1 line

It seems rather wasteful to allocate a large array when only a small one is needed.

It is.

Regards
Henrik