Menu

#5 can crash when used with WAN interface

open
nobody
None
5
2003-06-13
2003-06-13
No

daveberkeley@users.sourceforge.net

I have been using the service to filter a WLAN PPP
interface. This works fine, but if the WLAN interface is
not present (ie up) when the service is started and the
rules file contains rules for it, it crashes.

The error occurs in filters.c fn open_interface() in the
code immeadiately following the call to GetAdaptersInfo
(). This is called to get data on the current interfaces,
but the code seems to assume

* that the interfaces are returned by GetAdaptersInfo()
in the same order as they are declared in the rules!
* that all interfaces that have rules are present in the
adapters info list.

Both of these assumptions are wrong.

You need to monitor routing changes. NotifyRouteChange
() will do the job. You then need to keep the rules
seperate from the interface descriptors and then set the
filter rules to each interface as it comes up.

I can't see an easy way to do this using the existing
code base.

The order in which GetAdaptersInfo() returns data is not
defined. If you shut one WAN adapter down and start
another up, they may both appear to be "ppp1" so you
would assign rules to the wrong interface.

Discussion


Log in to post a comment.

Auth0 Logo