@jimp:
The code that is in place is correct for most setups, perhaps there is something else unique/incorrect about your configuration contributing to the detection failure, but we had some fallout from this while testing the -RELEASE images.
So the code is back to how it was before, and it is confirmed working on several very large CARP+DHCP Failover setups. If it does not work for you on 2.1-RELEASE, I'd take a closer look at your configuration first.
Okay. I don't see how the original code could be correct, since the loop variable to
check for "a defined vip" (according to the commentary) isn't actually used for
searching, and I pointed out that your fix was not correct either.
But I understand you don't want to break things just before release. My later
version seems to work correctly for me, so I'll just work with a local patch then.
I suggest to have a look at this again in 2.1-stable .
Cheers,
Markus
PS: for illustration (original):
foreach ($a_vip as $vipent) {
if($int == $real_dhcpif) {
/* this is the interface! */
if(is_numeric($vipent['advskew']) && ($vipent['advskew'] < "20"))
$skew = 0;
}
}
can be transformed into:
if($int == $real_dhcpif) {
foreach ($a_vip as $vipent) {
/* this is the interface! */
if(is_numeric($vipent['advskew']) && ($vipent['advskew'] < "20"))
$skew = 0;
}
}
and this just doesn't look correct to me.