[ipfilter-cvs] ipfilter ip_fil_solaris.c,v5-1-RELEASE
Brought to you by:
darren_r
From: Darren <dar...@us...> - 2012-07-20 07:41:35
|
Update of /cvsroot/ipfilter/ipfilter In directory vz-cvs-4.sog:/tmp/cvs-serv26452 Modified Files: Tag: v5-1-RELEASE ip_fil_solaris.c Log Message: 3545311 ifp_ifaddr does not find the first set address Index: ip_fil_solaris.c =================================================================== RCS file: /cvsroot/ipfilter/ipfilter/ip_fil_solaris.c,v retrieving revision 1.27.2.20 retrieving revision 1.27.2.21 diff -C2 -d -r1.27.2.20 -r1.27.2.21 *** ip_fil_solaris.c 9 Jul 2012 16:22:33 -0000 1.27.2.20 --- ip_fil_solaris.c 20 Jul 2012 07:41:33 -0000 1.27.2.21 *************** *** 723,726 **** --- 723,727 ---- net_ifaddr_t types[2]; void *array; + int error; if ((qifptr == NULL) || (qifptr == (void *)-1)) *************** *** 742,748 **** if (v == 4) { array = sin; ! net_getlifaddr(softc->ipf_nd_v4, (phy_if_t)qifptr, 0, ! 2, types, sin); } else { array = sin6; --- 743,758 ---- if (v == 4) { + int logical = 0; + array = sin; ! do { ! error = net_getlifaddr(softc->ipf_nd_v4, ! (phy_if_t)qifptr, logical, ! 2, types, sin); ! logical++; ! } while (types[0] == NA_ADDRESS && error == 0 && ! sin[0].sin_addr.s_addr == 0); ! if (sin[0].sin_addr.s_addr == 0 && error != 0) ! return error; } else { array = sin6; |