Jira (FACT-2951) Facter 3 bad network when connected to a VPN

1 view
Skip to first unread message

Dorin Pleava (Jira)

unread,
Mar 1, 2021, 5:35:02 AM3/1/21
to puppe...@googlegroups.com
Dorin Pleava created an issue
 
Facter / Bug FACT-2951
Facter 3 bad network when connected to a VPN
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2021/03/01 2:34 AM
Priority: Normal Normal
Reporter: Dorin Pleava
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Dorin Pleava (Jira)

unread,
Mar 1, 2021, 5:58:04 AM3/1/21
to puppe...@googlegroups.com
Dorin Pleava updated an issue
Change By: Dorin Pleava
Acceptance Criteria: When connected to a VPN, running `facter network` with facter 3, i get a different network than running the same command with facter 4. I assume facter 3 output is incorrect as `facter networking.ip` matches the `facter network`.
Affects Version/s: FACT 3.14.1
On OSX(could be on other platforms as-well), when connected to a VPN, Facter 3 shows network incorrect.

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.

Dorin Pleava (Jira)

unread,
Mar 1, 2021, 5:59:03 AM3/1/21
to puppe...@googlegroups.com
Dorin Pleava updated an issue
Change By: Dorin Pleava
Acceptance Criteria: When connected to a VPN, running `facter network` with facter 3, i get a different network than running the same command with facter 4. I assume facter 3 output is incorrect as `facter networking.ip` matches the `facter network`. `facter network should show the correct network`

Dorin Pleava (Jira)

unread,
Mar 1, 2021, 9:18:04 AM3/1/21
to puppe...@googlegroups.com
Dorin Pleava updated an issue
On OSX(could be on other platforms as-well), when connected to a VPN, Facter 3 shows network incorrect.

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-03-50-857.png|width=263,height=240!

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-14-18-644.png|width=361,height=188!

I think facter 3 cannot read the vboxnet0 netmask using `ipconfig getoption vboxnet0 server_identifier` so it cannot calculate the network.

 

Dorin Pleava (Jira)

unread,
Mar 1, 2021, 9:19:02 AM3/1/21
to puppe...@googlegroups.com

Dorin Pleava (Jira)

unread,
Mar 1, 2021, 9:21:02 AM3/1/21
to puppe...@googlegroups.com
Dorin Pleava updated an issue
Change By: Dorin Pleava
Attachment: image-2021-03-01-16-20-42-413.png

Dorin Pleava (Jira)

unread,
Mar 1, 2021, 9:22:02 AM3/1/21
to puppe...@googlegroups.com
Dorin Pleava updated an issue
On OSX(could be on other platforms as-well), when connected to a VPN, Facter 3 shows network incorrect.

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- 03 20 - 50 42 - 857 413 .png|width= 263 222 ,height= 240 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- 14 21 - 18 03 - 644 365 .png|width= 361 285 ,height= 188 149 !


I think facter 3 cannot read the vboxnet0 netmask using `ipconfig getoption vboxnet0 server_identifier` so it cannot calculate the network.

 

Dorin Pleava (Jira)

unread,
Mar 1, 2021, 9:22:02 AM3/1/21
to puppe...@googlegroups.com
Dorin Pleava updated an issue
Change By: Dorin Pleava
Attachment: image-2021-03-01-16-21-03-365.png
Reply all
Reply to author
Forward
0 new messages