[Openswan Users] recognition of an openswan vpn during inetaddr_notifier callback

Niall Noigiallach niall.noigiallach.02 at gmail.com
Sun Jan 31 01:22:45 EST 2010

I'm not sure if this is best for the users or developers list.  I'll try
here fist:

I'm writing a kernel module to detect when a new interface is activated and
then apply some firewall rules if it's not a vpn (long story about why I'm
doing this in kernel space as opposed to using udev).

I'm assuming I'll need register a notifier for the inetaddr_chain
notification chain (as opposed to the net_dev chain) to make sure the
netfitler tables have been initialized.  In the callback I should get a
net_device that should give me all I need to determine if the underlying
device is a openswan vpn or not.

The question is: what should I be looking for?

The best thing I've found so far is net_device.dev.driver->owner->name
Althought I'm not sure what to match it against.
Any thoughts/suggestions??
My initial thought is that this should match KBUILD_MODNAME ... which is??

Thank you for your help!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openswan.org/pipermail/users/attachments/20100131/ef8206ea/attachment.html 

More information about the Users mailing list