Q about ip_conntrack_expect_related()/ip_nat_expect_register()
Hi all!
I'm thinking of trying to put together a helper module, and I'm looking at existing code (plus reading howto's and searching the mbox archive) to try to grasp the way it all works.
I actually have two questions:
1) I'm looking at ip_{conntrack,nat}_irc.c (2.4.19). The help() function registered with ip_nat_helper_register(), seems to assume that the struct ip_conntrack *ct pointer passed, points to the same struct ip_conntrack that was modified in the conntrack help() function earlier. Why is that, what is the link between them? Just that the tuple/mask pair was identical in the ip_conntrack_helper_register() / ip_nat_helper_register() calls?
2) I also wonder why irc_nat_expected() is called at all! :-) Is it so, that every callback that is registered with ip_nat_expect_register(), is called for every connection that is "flagged" by ip_conntrack_expect_related() and is nat'ed in any way?
TIA,
- Peter
Signature · 4 lines
Peter 'Luna' Runestig (fd. Altberg), Sweden <[email protected]> PGP Key ID: 0xD07BBE13 Fingerprint: 7B5C 1F48 2997 C061 DE4B 42EA CB99 A35C D07B BE13 AOL Instant Messenger Screenname: PRunestig
Quoted 9 lines · Peter 'Luna' Runestig
Hi all!
I'm thinking of trying to put together a helper module, and I'm looking at existing code (plus reading howto's and searching the mbox archive) to try to grasp the way it all works.
I actually have two questions:
1) I'm looking at ip_{conntrack,nat}_irc.c (2.4.19). The
help()function
please don't look at 2.4.19 kernels, they predate the newnat changes.
Either look at 2.4.20-preX (where X > 2), or apply (at least) the newnat patch from patch-o-matic.
The API has changed in both the issues you are questioning.
Quoted 2 lines
TIA,
- Peter
Signature · 5 lines
Live long and prosper - Harald Welte / [email protected] http://www.gnumonks.org/ ============================================================================ "If this were a dictatorship, it'd be a heck of a lot easier, just so long as I'm the dictator." -- George W. Bush Dec 18, 2000