All of lore.kernel.org
 help / color / mirror / Atom feed
* Multiple targets for REDIRECT & friends
@ 2005-08-21 13:40 Munteanu Eduard Gabriel
  2005-08-23  2:41 ` Munteanu Eduard Gabriel
  0 siblings, 1 reply; 3+ messages in thread
From: Munteanu Eduard Gabriel @ 2005-08-21 13:40 UTC (permalink / raw)
  To: netfilter-devel

I'm looking to contribute this to netfilter.

Right now, ip_nat_multi_range is typedeffed (as a macro, though) to 
ip_nat_multi_range_compat. I think it will be okay to make 
ip_nat_multi_range be a linked list, but eliminate rangesize member. 
Older targets will preserve ip_nat_multi_range_compat, while those which 
support multiple targets will use this new structure.

However, there is a problem and I need your help. Linked lists need 
linux/list.h, but that one checks for __KERNEL__ and backfires when you 
need to compile iptables. As I see it, there are two solutions for that:
1) Using a "ip_nat_multi_range *next" pointer instead of using kernel's 
list_head. This fulfills all requirements for my patch, but I don't know 
if it's okay for kernel devels to use nonstandard lists (though there is 
no single-linked list implementation in kernel AFAIK).
2) Providing different linux/list.h in iptables package. This will bring 
up future API compatibility issues, so we need to maintain that header 
and insert checks for kernel version.
3) Modify linux/list.h so that it doesn't check anymore for __KERNEL__. 
Kernel devels won't be happy about this AFAICS.

If you have any other advice regarding my ideas on how to implement 
this, feel free to ask. I already came up with a patch for iptables' 
REDIRECT target, it just needs to have that linked list thingy filled up.

^ permalink raw reply	[flat|nested] 3+ messages in thread
* Multiple targets for REDIRECT & friends
@ 2005-08-21 20:23 Munteanu Eduard Gabriel
  0 siblings, 0 replies; 3+ messages in thread
From: Munteanu Eduard Gabriel @ 2005-08-21 20:23 UTC (permalink / raw)
  To: netfilter-devel

I'm looking to contribute this to netfilter.

Right now, ip_nat_multi_range is typedeffed (as a macro, though) to
ip_nat_multi_range_compat. I think it will be okay to make
ip_nat_multi_range be a linked list, but eliminate rangesize member.
Older targets will preserve ip_nat_multi_range_compat, while those which
support multiple targets will use this new structure.

However, there is a problem and I need your help. Linked lists need
linux/list.h, but that one checks for __KERNEL__ and backfires when you
need to compile iptables. As I see it, there are two solutions for that:
1) Using a "ip_nat_multi_range *next" pointer instead of using kernel's
list_head. This fulfills all requirements for my patch, but I don't know
if it's okay for kernel devels to use nonstandard lists (though there is
no single-linked list implementation in kernel AFAIK).
2) Providing different linux/list.h in iptables package. This will bring
up future API compatibility issues, so we need to maintain that header
and insert checks for kernel version.
3) Modify linux/list.h so that it doesn't check anymore for __KERNEL__.
Kernel devels won't be happy about this AFAICS.

If you have any other advice regarding my ideas on how to implement
this, feel free to ask. I already came up with a patch for iptables'
REDIRECT target, it just needs to have that linked list thingy filled up.

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

end of thread, other threads:[~2005-08-23  2:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-21 13:40 Multiple targets for REDIRECT & friends Munteanu Eduard Gabriel
2005-08-23  2:41 ` Munteanu Eduard Gabriel
  -- strict thread matches above, loose matches on Subject: below --
2005-08-21 20:23 Munteanu Eduard Gabriel

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.