route add failed even if could be done #338

Closed
opened 2025-11-20 05:09:51 -05:00 by saavagebueno · 0 comments
Owner

Originally created by @lfarkas on GitHub (May 18, 2023).

if i run netbird on a homeassistant inside a container and netbird try to set a remote route if got this error in log:

2023-05-18T14:11:18+02:00 ERRO client/internal/engine.go:612: failed to update routes, err: open /proc/sys/net/ipv4/ip_forward: read-only file system

even if the /proc/sys/net/ipv4/ip_forward already 1.

so imho in systemops_linux.go the enableIPForwarding first have to check whether it's already 1 and only if it's 0 have to try to set to 1. so in this case the /proc filesystem shouldn't have to be writeable in the network namespace. it'd be a very simple fix.

Originally created by @lfarkas on GitHub (May 18, 2023). if i run netbird on a homeassistant inside a container and netbird try to set a remote route if got this error in log: ``` 2023-05-18T14:11:18+02:00 ERRO client/internal/engine.go:612: failed to update routes, err: open /proc/sys/net/ipv4/ip_forward: read-only file system ``` even if the `/proc/sys/net/ipv4/ip_forward` already 1. so imho in `systemops_linux.go` the `enableIPForwarding` first have to check whether it's already 1 and only if it's 0 have to try to set to 1. so in this case the /proc filesystem shouldn't have to be writeable in the network namespace. it'd be a very simple fix.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#338