Good Day,

I have been working on porting Samba 4.11 to Cygwin for a few days and ran into 
an odd issue. Samba configures its interfaces in several steps, but it relies 
pretty heavily on getting information from the interface structures populated 
by Cygwin. While I was walking through the call map I noticed a lot of the data 
is populated by get_ifs and that routine may have a bug in its handling of 
IfIndex. Basically it seems to copy the IPv4 index at all times even though it 
may need Ipv6Index.

the same code exists at line 1904 and 1808 as well. I believe the current code 
may fail to retrieve the correct adapter index if IPv6 is enabled on the 
interface.
this is current code:  ifp->ifa_hwdata.ifa_ifindex = pap->IfIndex;

I think it should be:  ifp->ifa_hwdata.ifa_ifindex = (sa->sa_family == AF_INET
                                         ? pap->IfIndex : pap->Ipv6Index);

This is the model used by the lines retrieving the other elements with dual 
locations on the windows side.

I am unable to debug this to confirm it, but please let me know if this is 
actually a bug or not.

Sincerely,

David Bean



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply via email to