On OSX(could be on other platforms as-well), when connected to a VPN, Facter 3 shows network incorrect. This can also be repr
Facter 3 uses `route -n get default` to get the primary interface(utun for VPN interfaces), and then runs `ipconfig getoption <VPN interface> server_identifier` to try to get the dhcp server. For some reason when running ipconfig getoption on interfaces that are used for VPN connection nothing is outputted.
Facter 4 relies on `ifconfig` command and it works as expected.
The bug can be recreated without a VPN, by using VirtualBox: # Install VirtualBox # In VirtualBox, File -> Host Network Manager -> create a vboxnet0 adapter using 255.255.255.0 as IPv4 Network Mask
!image-2021-03-01-16-20-42-413.png|width=222,height=201!
3. Edit/Create a virtual machine, go to machine settings -> Network, and make sure one Adapter is `Host-Only Adapter` that uses your vboxnet0.
4. Start the VM, and locally, run puppet facts diff.
!image-2021-03-01-16-21-03-365.png|width=285,height=149!
I think facter 3 cannot read the vboxnet0 netmask using `ipconfig getoption vboxnet0 server_identifier` so it cannot calculate the network.
|
|
|