daeuniverse / daeuniverse/dae

Daemon fails to start (and may hang on exit) when IPv6 is disabled in kernel: fatal sysctl on net.ipv6.conf.dae0.*

Open
#911 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
6.2k
Forks
404
Avg merge
57m
Merged PRs (30d)
2

Description

### Checks

- [x] I have searched the existing issues
- [x] I have read the documentation
- [ ] Is it your first time sumbitting an issue

### Current Behavior

When IPv6 is disabled at the kernel level (e.g., ipv6.disable=1 or IPv6 module not available), dae fails during netns setup because it unconditionally writes IPv6 sysctls for the host veth (dae0).​
This triggers an error like “failed to set disable_ipv6 for dae0: no such file or directory” and then causes a chain reaction where the process cannot exit cleanly (appears to hang / not terminate as expected).
At control/netns_utils.go around line 289 (https://github.com/daeuniverse/dae/blob/main/control/netns_utils.go#L289), dae writes IPv6 sysctls (e.g., net.ipv6.conf.dae0.disable_ipv6 / forwarding) unconditionally before continuing netns setup.​
If IPv6 is disabled at the kernel level, the IPv6 sysctl tree (e.g., /proc/sys/net/ipv6/...) may not exist, so this operation can return ENOENT, and crashing/failing hard at that point is incorrect behavior.​
Please check whether IPv6 is available/enabled before touching any net.ipv6.* sysctls (or treat ENOENT as “IPv6 unsupported” and skip IPv6 initialization), so dae can still run in IPv4-only systems and exit cleanly on other errors.

### Expected Behavior

_No response_

### Steps to Reproduce

1. add kernel arg ipv6.disable=1

### Environment

- **Dae version (use `dae --version`)**: daed version v1.21.1
- **OS (e.g `cat /etc/os-release`)**: ubuntu 24.04
- **Kernel (e.g. `uname -a`)**: linux 6.x
- **Others**:

### Anything else?

_No response_

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in control/netns_utils.go around line 289, where dae writes the net.ipv6.* sysctls during network namespace setup. Reproduce with the ipv6.disable=1 kernel argument and inspect the ENOENT path. Done means dae can run on an IPv4-only system and exits cleanly when IPv6 sysctls are unavailable.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, linux
Domain
networking, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.