Re: nlif_index2name bug?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Le samedi 17 novembre 2007 à 14:53 +0200, Jaco Kroon a écrit :
> Hi guys,
> 
> I've seen an error in nlif_index2name, specifically, if an interface
> comes up _after_ I've opened the nlif_handle (using nlif_open()) then it
> won't resolve the index of that device to a name.
> 
> Is this a known issue, a bug or simply me not understanding how nlif
> works?

Yes, you did not understand how nlif is working (but I think this is due
to the lack of documentation). If fact, you have omit to listen to iface
events and to call nlif_catch after each event.

For a working code example, you can have a look at NuFW's code. nlif
related code is always prefixed by:
#ifdef HAVE_NLIF_CATCH

You can browse code online at:
http://software.inl.fr/trac/trac.cgi/browser/mirror/edenwall/nufw/trunk/nufw/src/nufw/packetsrv.c
http://software.inl.fr/trac/trac.cgi/browser/mirror/edenwall/nufw/trunk/nufw/src/nufw/iface.c

I've just wrote a brief nlif documentation on the following page:
http://software.inl.fr/trac/trac.cgi/wiki/articles/using_nlif

BR,
-- 
Eric Leblond <eric@xxxxxx>
INL

Attachment: signature.asc
Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux