[ipfilter-cvs] ipfilter ip_fil_solaris.c,
Brought to you by:
darren_r
From: Darren <dar...@us...> - 2012-07-20 07:41:23
|
Update of /cvsroot/ipfilter/ipfilter In directory vz-cvs-4.sog:/tmp/cvs-serv26443 Modified Files: 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.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** ip_fil_solaris.c 9 Jul 2012 16:21:52 -0000 1.44 --- ip_fil_solaris.c 20 Jul 2012 07:41:21 -0000 1.45 *************** *** 722,725 **** --- 722,726 ---- net_ifaddr_t types[2]; void *array; + int error; if ((qifptr == NULL) || (qifptr == (void *)-1)) *************** *** 741,747 **** if (v == 4) { array = sin; ! net_getlifaddr(softc->ipf_nd_v4, (phy_if_t)qifptr, 0, ! 2, types, sin); } else { array = sin6; --- 742,757 ---- 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; |