Stephen C. Steel wrote:
> Yes, this reliance on artificially generated Unix style names (of form
> "ethN") for adapters might cause problems if the list of network adapters
> changes while the sipXtapi library is active. When getContactAdapterName()
> is called with truename=false (as is always the case after my patch is
> applied), the Unix style name that is generated just reflects the adapters
> position in the linked list returned by GetAdaptersInfo(). If another
> adapter is added or removed earlier in the list, the name returned by
> getContactAdapterName() would change. When getContactAdapterName() is called
> with truename=true, then it returns the GUID based name that Windows uses
> internally (which should be unique and stable).
> 
> I only started looking at the DNS code because it didn't work at all for a
> very simple case: one Ethernet adapter, with statically configured IP and
> DNS servers under Windows XP.
> 
> Stephen C. Steel
> 

I see

Since this piece of code seems to be as buggy as the original sipxtapi
was before refactoring, I'm going to fix all this as well. Your patch is
a nice place to start. I have already fixed some bugs there were still
there after your patch. Unfortunately, these fixes won't be available to
sipxtapi branch (only to experimental), as there were some changes
necessary that depend on which sipxtapi is used. I have also discovered
microsoft copyright infringment in getWindowsDNSServers.h, it's a copy
of iptypes.h . This file also exists in the sipxecs branch where Pingtel
claims the copyright. It just shows what kind of code quality checks
were in place in Pingtel... I have removed all content of iptypes.h,
which then caused a chain reaction and I had to modify many more files.

We cannot expect that network adapters won't change when sipxtapi is
running, all code has to work with GUIDs in Windows unfortunately. This
means checking all places where this change might cause buffer overflow.

Jaro
_______________________________________________
sipxtapi-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/

Reply via email to