Alex Melan
dd056e006c
fix: avoid panics on edge-case input across modules ( #1343 )
...
## Summary
- ipv6rwc: validate IPv6 packet length before reading the version nibble
in writePC
- config: guard the BOM check against configs shorter than two bytes
- admin: replace unchecked net.Error type assertion with errors.As;
tolerate empty unix socket paths
- multicast: log and continue on ReadFrom errors instead of panicking;
use checked type assertion on UDPAddr
- mobile: reject negative length in SendBuffer; nil-check AddrForKey in
GetPeersJSON and SummaryForConfig
- admin/get{tree,paths,sessions}: skip entries when AddrForKey returns
nil instead of dereferencing
- core/nodeinfo: validate the requested public key length in
nodeInfoAdminHandler, matching the other proto handlers
- add regression tests for the panic paths
## Why
A handful of error paths and platform-API edge cases reach fixed-size
indexing or unchecked type assertions before any length validation.
Most are reachable only locally (an empty config piped to -useconf,
a 0-byte packet from the mobile bindings, an admin DialTimeout error
that doesn't satisfy net.Error on some platforms), but they crash the
daemon hard. Have them return errors or skip the entry instead.
## Testing
- go test ./...
- go vet ./...
2026-05-12 21:42:57 +01:00
Neil Alexander
2454970e4d
Tweaks to configuration
2024-11-22 09:47:33 +00:00
Neil Alexander
ff0ef7ff56
Update comments in default configuration file
2024-10-27 20:59:05 +00:00
Paul Donald
f56f9c124c
Minor Fixes ( #1107 )
...
* Minor comment fixes.
* Optimize PeerEntry for memory efficiency
* Improve NodeConfig for memory alignment
2024-05-27 21:57:28 +01:00
Neil Alexander
f6f669617f
Fix -normaliseconf when using PrivateKeyPath
2023-11-26 16:20:52 +00:00
Neil
0b578a637a
Debian package updates ( #1073 )
...
* Update Debian package
* Don't put `AdminListen` in config by default, fix path in Debian package
* Fix path in unit file
* Preserve original service files for other packages
---------
Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com >
2023-10-28 14:58:52 +01:00
Arceliar
d17ac39789
update ironwood dependency, add a debug API call for lookups
2023-10-28 05:26:43 -05:00
Neil Alexander
2a21241738
Multicast passwords
2023-10-11 19:28:28 +01:00
Neil Alexander
45b773eade
Remove TLS root validation
...
This is just too complicated compared to the per-peer/per-listener/per-interface password
approach.
2023-10-11 18:25:35 +01:00
Neil Alexander
002b984c04
Fix private key setup when certificate not specified
2023-06-18 18:10:27 +01:00
Neil Alexander
e290e744f4
Fix -autoconf
2023-05-20 10:54:49 +01:00
Neil Alexander
7afa23be4c
Link refactoring, admin socket changes
2023-05-19 19:09:05 +01:00
Neil Alexander
590d83aa9c
Fix #975 by not exporting uint8
2022-11-01 17:42:52 +00:00
Neil Alexander
f08dec822a
Priority support ( #964 )
...
* Allow setting link priorities
* Fix a bug
* Allow setting priority on listeners and multicast interfaces
* Update `yggdrasilctl`
* Update to Arceliar/ironwood#5
2022-10-26 09:24:24 +01:00
Neil Alexander
69632bacb5
Tidy up
2022-10-02 13:20:39 +01:00
Neil Alexander
e165b1fa0c
Add quote marks to InterfacePeers comment
...
Fixes #945 .
2022-09-24 14:44:50 +01:00
Arceliar
de853fed10
multicast configuration changes
2021-06-27 17:24:46 -05:00
Arceliar
2874ce1327
change multicast config format
2021-06-27 03:15:41 -05:00
Arceliar
2a7a53b6b6
move GenerateConfig to defaults, to adjust dependency ordering, needed for stuff later
2021-06-27 02:18:51 -05:00
Neil Alexander
39361af789
Update config comments
2021-06-19 17:51:11 +01:00
Arceliar
e7da3d72c4
remove session firewall, this can't prevent memory use so it's better to just use OS native tools
2021-06-06 02:35:02 -05:00
Neil Alexander
4a684e7caf
Don't add mutex to config output
2021-06-05 21:48:20 +01:00
Neil Alexander
166336a418
Remove config.NodeState (hot reconfig is no longer supported)
2021-06-02 14:19:32 +01:00
Arceliar
0343dad934
remove obsolete crypto package
2021-05-23 14:33:28 -05:00
Neil Alexander
416eadbcff
Use uint64 for MTU for forward-compatibility
2021-05-16 20:00:45 +01:00
Neil Alexander
2d01386d6e
Refactor admin socket, export request/response structs, remove types package
2021-05-16 19:51:09 +01:00
Arceliar
85fae23919
remove TunnelRouting from config, remove Signing from key names
2021-05-15 15:00:12 -05:00
Neil Alexander
e12c639c21
Remove obsolete switch options
2021-05-10 22:42:57 +01:00
Neil Alexander
05caf36f4e
Fix AllowedPublicKeys
2021-05-10 22:39:12 +01:00
Neil Alexander
bb92e61e68
Remove encryption public key options (they are now derived from ed25519 key conversion in IW), also bump link version number
2021-05-10 22:06:38 +01:00
Adam Ruzicka
8358fe5c5c
Unify MTU datatypes across the codebase
...
The codebase uses int and unit16 to represent MTU randomly. This change
unifies it to a MTU type from types package, which is currently uint16.
2020-01-05 18:01:22 +00:00
Dimitris Apostolou
73f50af3b7
Fix typos
2019-11-29 11:45:02 +02:00
Neil Alexander
f95ebeb821
Remove references to TAP
2019-11-22 20:08:19 +00:00
Neil Alexander
f5517acc81
Drop Water, use Wireguard tun library, drop TAP support
2019-11-22 16:43:50 +00:00
Neil Alexander
af3dcb44d8
Update config.go godoc
2019-09-02 09:45:11 +01:00
Neil Alexander
2a629880fd
Rename crypto-key config options, improve control flow
2019-08-19 10:28:30 +01:00
Neil Alexander
de1005e4fa
Various API changes and simplifications to fix mobile builds
2019-07-27 15:00:09 +01:00
Neil Alexander
17175b49f2
Add multicast interfaces to platform-specific defaults (this makes it easier to avoid bringing AWDL up by default on macOS as an example, or over L2 VPNs when not expected)
2019-06-11 10:18:59 +01:00
Neil Alexander
9bc24f8dbf
Return both current and previous config when replacing
2019-04-15 22:00:38 +01:00
Neil Alexander
0b494a8255
Refactoring: move tuntap and icmpv6 into separate package
2019-03-28 00:30:25 +00:00
Neil Alexander
41872820c3
Remove isAutoconf option to GenerateConfig
2019-03-12 19:18:43 +00:00
Neil Alexander
4062c93e18
Re-order config, update default Listen
2019-03-12 19:04:30 +00:00
Neil Alexander
830be7f4db
Update comments again
2019-03-12 16:06:12 +00:00
Neil Alexander
c388885a92
Update config comments for AllowedEncryptionPublicKeys
2019-03-12 15:29:42 +00:00
Neil Alexander
ec19c479dd
Add comment about no reloading for LinkLocalTCPPort
2019-03-10 19:17:03 +00:00
Neil Alexander
9d5ca85424
Add LinkLocalTCPPort option
2019-03-10 19:08:56 +00:00
Neil Alexander
57eb6eaeb0
Clean up config package
2019-03-06 17:45:47 +00:00
Neil Alexander
18ef28a477
Fix default Listen config
2019-03-06 13:00:45 +00:00
Neil Alexander
be8db0c120
Support multiple TCP listeners
2019-03-04 17:52:57 +00:00
Neil Alexander
0ca64b0abe
Remove ReadTimeout configuration option
2019-02-10 12:13:49 +00:00