Turning off tx/rx csum offloading for loopback on boot breaks internet

If I turn off tx/rx csum for lo0 in the current session, ifconfig confirms those options are off and internet works.
If I turn it off in /etc/rc.conf by ifconfig_lo0="-txcsum -rxcsum" and reboot, ifconfig confirms those options are off, but there's no internet even though the network interface is active.

Stumped.
 
check the order the interfaces are being initialized and look for errors. My guess is that lo is brought up first, encounters an error, and aborts bringing up the other interfaces. You could also manually bring up the ethernet nic and see if Inet comes back.
 
But no, the internet interface is up and status:active! But no internet.
No internet is quite a generic term...No IP connectivity to LAN peers? No DNS resolution? Internet connectivity is layered. Start peeling back the layers and see at what layer things are broken. Are any packets being transferred or is DNS broken, thus requiring IP numbers to connect...or is the routing table fubared?
 
I canot confirm that behaviour. Booting with ifconfig_lo0="-txcsum -rxcsum" works here.

Nonetheless. Why even bother with having those options then? It still changes the way csuming is performed?
It most likely does. Without csum offloading the csums are supposed to be created within the IP stack. With csum offloading they are supposed to be created in the device driver hardware, and with this being virtual, in the virtual emulation code for the device driver.
Between the former and the latter is the hook for the firewall, so these are separated in an obvious way, and one could even look into what is happening. But, as mentioned, I cannot reproduce.
 
Ok, turns out I have internet but nothing works because local_unbound can't start:
Code:
[1776679680] local-unbound[46573:0] error: can't bind socket: Can't assign requested address for 127.0.0.1 port 53
[1776679680] local-unbound[46573:0] fatal error: could not open ports
/etc/rc.d/local_unbound: WARNING: failed to start local_unbound
Strangely, turning txcsum and rxcsum on lo0 after this and then trying to start local_unbound produces the same error.
Again, this happens only if booting with ifconfig_lo0="-txcsum -rxcsum".
 
Ok, turns out I have internet but nothing works because local_unbound can't start:
Hm, I don't have this normally in use.

Code:
[1776679680] local-unbound[46573:0] error: can't bind socket: Can't assign requested address for 127.0.0.1 port 53
[1776679680] local-unbound[46573:0] fatal error: could not open ports
/etc/rc.d/local_unbound: WARNING: failed to start local_unbound
Yepp, confirmed. Inserting /bin/sh into /etc/rc.d/local_unbound:
Code:
# ifconfig
lo0: flags=1008049<UP,LOOPBACK,RUNNING,MULTICAST,LOWER_UP> metric 0 mtu 16384
        options=680000<LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
        groups: lo
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>

There is no IPv4 address on the interface at this point in time.

No, there is never an IPv4 address there with these options!
What you get is a routing table entry, mapping 127.0.0.1 to lo0. For many things this might suffice, but we cannot bind() an address that doesn't actually exist.

So, apparently, when you tell the system to add special options to lo0, you must tell it the full configuration alongside:
ifconfig_lo0="127.0.0.1/8 -txcsum -rxcsum"
 
Back
Top