Main repository for pfSense
Go to file
Phil Davis 62403377e1 Do not monitor a gateway that has not got DHCP yet
When an interface is waiting to get DHCP, but the cable is physically-electrically connected to the upstream device, the interface has an IPv4 address 0.0.0.0 - that was getting past here and, if the interface gateway had a monitor IP specified, that monitor IP was being put into apinger.conf and being monitored. Because the interface has not got a gateway yet, no static route is added to force the traffic for the monitor IP out the particular interface. So the traffic to the monitor IP can follow the default route and perhaps succeed in getting out another WAN to the monitor IP.
The downstream results of this were:
1) Gateway status appears up and reports real RTT and Loss statistics, even though the interface is down.
2) Generation of rules for a gateway group that has this gateway as tier1 will think it is up, and thus try to policy-route traffic to it - which then does not get anywhere.
3) DynDNS status of a gateway group that has this gateway as tier1 shows the cached IP in red - it thinks the interface/gateway is up and tries to find the public IP by trying to get to checkip.dyndns.com through the interface/gateway. That of course fails.
4) I'm sure there are other things that depend on checking gateway and gateway group status that would also be getting it wrong in this condition, because apinger is being told to monitor, and manages to successfully monitor, an interface/gateway that has not yet got DHCP.

When waiting for DHCP, ifconfig shows like this on my system (WAN is on a cable to a VLAN switch):
vr0_vlan70: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 00:0d:b9:24:59:c0
        inet6 fe80::20d:b9ff:fe24:59c0%vr0_vlan70 prefixlen 64 scopeid 0xf
        inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
        vlan: 70 vlanpcp: 0 parent interface: vr0

From what I can see, this little 2-line fix ends up correcting all the downstream effects I listed above.
Should fix RedMine #4094
2015-01-05 11:17:27 -02:00
boot setting nmbclusters to 0 just results in an error, remove unnecessary line 2014-11-04 18:44:29 -06:00
cf/conf Its long overdue the ez-ipupdate.cache file 2014-04-26 09:59:37 +00:00
conf.default Add config upgrade code to make sure iketype is set, bump config version to 11.4. It fixes #4163 2014-12-31 12:54:34 -02:00
etc Do not monitor a gateway that has not got DHCP yet 2015-01-05 11:17:27 -02:00
root Set proxy env vars on interactive shell and also on crontab to make all scripts be able to use it. Ticket #3789 2014-11-11 11:57:38 -02:00
sbin Set this to /8 instead since that's how it's done in stock FreeBSD 10.1. Ticket #3941 2014-11-10 21:52:52 -06:00
tmp Deal correct with filenames with spaces 2014-11-14 07:46:57 -02:00
usr Fix track6 prefix id range check, reported by jimp 2015-01-02 13:07:15 -02:00
.gitattributes include gettext locales in line encoding list 2014-01-13 22:05:10 -05:00
.gitignore Ignore vim swap files 2013-03-08 14:41:01 -03:00
license.txt Welcome 2015 2014-12-31 16:22:27 -02:00