p2p tun configs break with new topology default in non-obvious ways
@flichtenheld is already working on this.
Since Apr 8, 2024.
- Dominant language
- C
- Stars
- 14.6k
- Forks
- 3.4k
- PR merge metrics
- No merged PRs in 30d
Description
so there's a p2p tun config with
ifconfig 10.204.8.1 10.204.8.2
and with commit 32e6586687 the new default is now topology subnet. This leads to the instance no longer starting, with
Apr 3 18:17:06 gentoo tun-udp-p2p[11730]: do_ifconfig, ipv4=1, ipv6=1
Apr 3 18:17:06 gentoo tun-udp-p2p[11730]: net_addr_v4_add: 10.204.8.1/-1 dev tun7
Apr 3 18:17:06 gentoo tun-udp-p2p[11730]: sitnl_send: rtnl: generic error (-22): Invalid argument
Apr 3 18:17:06 gentoo tun-udp-p2p[11730]: Linux can't add IP to interface tun7
Apr 3 18:17:06 gentoo tun-udp-p2p[11730]: Exiting due to fatal error
so it seems "something" is trying to convert the second argument to a netmask/netbits, failing, assigning "-1" to "something" and passing that to sitnl...
This is a config with no client or server, just plain p2p udp, so it surprised me a bit that topology would be relevant here - but quite obviously it changes the interpretation of ifconfig.
So there's two questions here
- can we make the error message less obviously "the parser did not expect this and put -1 into something which didn't care"?
- should we keep the topology at
net30for point-to-point configs (noserver)? Which is, of course, much more work than just changing the global default for all...
@ordex for the parser, @flichtenheld for the topology default.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.