Upgrade Network Woes


I have to echo @Miki_J experience. My setup had been working fine, but after the recent stable update, it need a route add default for networking to work despite having the line:


in /etc/rc.conf. There have been no other hardware or software changes associated with this system or the network. Other machines not running TrueOS continued to work correctly on this network. And like the OP, the only difference in my rc.conf after the upgrade is:

$ diff -u /etc/rc.conf{.preUpgrade,}
--- /etc/rc.conf.preUpgrade	2017-12-17 09:51:57.230929000 -0800
+++ /etc/rc.conf	2018-03-30 07:37:49.545990000 -0700
@@ -3,7 +3,6 @@
 kldload_nvidia="nvidia-modeset nvidia"


welcome to tracking FreeBSD 12-current


Hmm. I have a static IP config, with a defaultrouter defined and did not have any issue after upgrade.

Is your default router in the same subnet as one of the interfaces? I think if you try to add the default route and it can’t figure out which interface to go out it may fail. Maybe look at the /etc/init.d scripts, figure out where it’s adding the default route and try logging more info?


Yes, the default is in the same subnet as my one and only interface:

% pciconf -lv | grep -c network

em0@pci0:0:31:6: class=0x020000 card=0x06b91028 chip=0x1
5b78086 rev=0x31 hdr=0x00
vendor = ‘Intel Corporation’
device = ‘Ethernet Connection (2) I219-LM’
class = network
subclass = ethernet


Ok. If adding the route by hand after the interface is up, then to me that implies a timing issue during boot: the default route is being added but the routing code can’t figure out “how to get there”, because the em0 interface is not up or hasn’t gotten it’s address yet.

/etc/init.d/routing is the code that sets up the default route, the depend() clause has “need localmount” and “use net”.
there should be a /etc/init.d/network.em0 that is a symlink to /etc/init.d/network, that does a “provide net”.
I don’t know if the “use net” in the routing script should be “need net” or “after net” but you could look at trueos repos on github to see if there were any changes in the routing init script. Heck if it worked fine before, you can use beadm to mount the previous BE in a temp location and then do a compare between the working and nonworking scripts.

Long winded way of saying “potential race condition between the routing and network scripts during boot”.

man openrc-run gives good info. The way I read it the “use net” in the routing script will attempt to start the network script, but it’s unclear if it will wait for it. Perhaps in routing change the “use net” to “after net” which means it routing will not start until after network has been started.


I tried to boot my old BE, but it won’t boot now, but I did change “use net” to “after net” and still have to manually add the default route.


Ok. Not sure where to go from here.


Well, thanks, regardless, but I do wonder if these Segmentation faults (evolution and cups_browsed) have anything to do with it. I have uninstalled and reinstalled evolution to no avail.


I modified /etc/init.d/routing script to add after net in the depend function, and then sprinkled logger(1) statements in various places. The output from dmesg seems to indicate that the interface is up before the routing configuration begins:

Apr 11 06:47:13 fluffy kernel: igb0: link state changed to UP
Apr 11 06:47:28 fluffy routing: routing_start: Wed Apr 11 06:47:28 PDT 2018 _cmd static, _af any, _if igb0

Note that on my system /etc/init.d/network.igb0 is not a symlink to /etc/init.d/network if that matters.

Also, I couldn’t work out how routing adds the default route. static_inet() seems to get the correct value for ${defaultrouter}, but the script doesn’t seem to use it. The function does call ${ROUTE_CMD} for static routes, but nothing is done with the default route.


Mounted the previous BE and the following files are different:


One change is the removal of /etc/init.d/net-online (i.e. existed in the previous BE but not in the current), but that may only be directly applicable to ypbind.

OK, I found it. The new stable image added the following to /etc/defaults/rc.conf:

@@ -786,6 +788,7 @@
 # This allows net.wlan and any service not matching net.* to be hotplugged.
 # Example - rc_hotplug="!net.*"
 # This allows services that do not match "net.*" to be hotplugged.
+rc_hotplug="network.* moused.* dhcpcd.* jail.* wpa_supplicant.*"
 # rc_logger launches a logging daemon to log the entire rc process to
 # /var/log/rc.log

Removing the rc_hotplug=... line allows the network to come up normally. Changing the depend function in /etc/init.d/routing to after net does not appear to be necessary. Can someone comment on this change?


The commit which changed this is 77f905a - Cleanup of devd.conf and start using OpenRC’s rc.devd shim by @kris if that helps.


Good work Chuck! I concur that fixes the problem for me, too. I even tried it with only:


and it still broke the default route.

BTW, it had no effect on evolution having a segmentation fault, so that’s probably a separate matter.


Any thoughts from the TrueOS devs on this change to OpenRC?


Filed issue #35 on github to track this


i get exactly the same issue and resolve it temp by editing /etc/defaults/rc.conf as mentioned in the post. So for the moment, my laptop can connect to my network.
I’m just very surprised by the fact that my laptop and my workstation follow the same upgrade/update cycle with the same versions and only my laptop have the problem. My WS runs perfectly/