Commit Graph
47 Commits
Author SHA1 Message Date
Ryan Huber 73d26dd87d tun: Allow excluding CPUs from process threads at startup
Set tun.avoid_cpus to a list of logical CPUs to remove from the affinity of
every thread of the process on Linux, before services start and reader CPUs
are chosen. Later threads inherit the restricted mask; enumeration repeats so
threads created meanwhile are covered. Inherited taskset and cgroup
restrictions are kept. Keeping Nebula off the underlay NIC's receive IRQ CPUs
and their SMT siblings is what this is for; the example configuration shows
how to find them.

Invalid IDs, a list that would leave a thread no CPU, and syscall failures
fail startup. Configuration tests only validate. Other platforms log and
ignore the setting. The exclusion is process-wide, including embedded use, and
not reloadable. It is independent of thread pinning.

New API: util.AvoidCPUs, next to the existing PinThreadToCPU and AllowedCPUs.

Tests run in a child process and check existing and new threads, preserved
inherited masks, validation without changes, and the unix.CPUSet bounds on
32- and 64-bit platforms. No isolated performance claim is made.
2026-10-15 14:40:45 +00:00
Ryan Huber 8a2de9b1b5 examples: set socket buffers and raise tun tx_queue (#1928)
* examples: set socket buffers and raise tun tx_queue

* examples: use the default tcp max window for socket buffers

* examples: note buffers are linux only, clarify tx_queue default

* tun: default tx_queue to 5000
2026-10-11 00:30:07 -04:00
Ryan Huber e28336c5db probes to the lh are not generally useful as recv_error should catch (#408) 2023-03-29 15:09:36 -05:00
Ryan Huber 3aaaea6309 don't allow a useless handshake with yourself (#402)
* don't allow a useless handshake with yourself

* remove helper
2021-03-15 12:58:23 -07:00
Ryan Huber 73a5ed90b2 Do not allow someone to run a nebula lighthouse with an ephemeral port (#399)
* Do not allow someone to run a nebula lighthouse with an ephemeral port

* derp - we discover the port so we have to check the config setting

* No context needed for this error

* gofmt yourself

* Revert "gofmt yourself"

This reverts commit c01423498e.

* Revert "No context needed for this error"

This reverts commit 6792af6846.

* snip snap snip snap
2021-03-08 12:42:06 -08:00
Ryan Huber 43a3988afc i don't think this is used at all anymore (#323) 2020-10-29 21:43:50 -04:00
Ryan Huber 0d6b55e495 Bring in the new version of kardianos/service and output logfiles on osx (#303)
* this brings in the new version of kardianos/service which properly
outputs logs from launchd services

* add go sum

* is it really this easy?

* Update CHANGELOG.md
2020-09-24 15:34:08 -07:00
Ryan HuberandNate Brown 1297090af3 add configurable punching delay because of race-condition-y conntracks (#210)
* add configurable punching delay because of race-condition-y conntracks

* add changelog

* fix tests

* only do one punch per query

* Coalesce punchy config

* It is not is not set

* Add tests

Co-authored-by: Nate Brown <nbrown.us@gmail.com>
2020-03-27 11:26:39 -07:00
Ryan Huber 41968551f9 clarify that lighthouse IP should be nebula range (#196) 2020-02-28 11:35:55 -08:00
Ryan Huber a91a40212d check that packet isn't bound for my vpn ip (#192) 2020-02-21 16:49:54 -08:00
Ryan Huber 25bf80d8d3 add new invite link without expiration date (#165)
merging because link doesn't work rn and this is not a code change.
2020-01-16 10:09:45 -06:00
Ryan Huber 91f7b9c049 Update README.md
fix readme
2020-01-07 12:40:25 -06:00
Ryan Huber fd8ad5d0d7 Merge pull request #133 from slackhq/interval_zero_check
if interval is 0 don't even update lh (mobile use case)
2019-12-26 15:57:01 -06:00
Ryan Huber df8e45c13b if interval is 0 don't even update lh (mobile use case) 2019-12-26 21:12:31 +00:00
Ryan Huber fe58cedd2e Merge pull request #120 from slackhq/add_slack_link
add invitation link to readme
2019-12-20 08:33:38 -08:00
Ryan Huber 7ee692663d add invitation link to readme 2019-12-20 16:28:17 +00:00
Ryan Huber 2c8b0ec7b1 Merge pull request #105 from slackhq/fix_lighthouse_check
should be break not continue
2019-12-17 09:18:57 -06:00
Ryan Huber 5d0d916fc9 should be break not continue 2019-12-17 14:43:01 +00:00
Ryan Huber a680ac29f5 Merge pull request #98 from slackhq/warn_not_error
make this a warning, even though i believe it is fundamentally an error (in judgement)
2019-12-13 16:03:36 -06:00
Ryan Huber ad7079d370 make this a warning, even though i believe it is fundamentally an error
(in judgement)
2019-12-13 21:55:01 +00:00
Ryan Huber 6a37b26f9a Merge pull request #94 from infinytum/patch-1
Fix for Issue #90
2019-12-13 10:42:59 -06:00
Ryan Huber cec698b1b3 Merge pull request #91 from slackhq/fix_examle
derp- example config is now less silly
2019-12-12 12:59:15 -06:00
Ryan Huber cedf9549a6 derp- example config is now less silly 2019-12-12 18:50:52 +00:00
Ryan Huber 5217f28264 Merge pull request #79 from slackhq/subnet_support
Subnet and routing support.
2019-12-12 12:36:56 -06:00
Ryan Huber 9981510554 new mtu setting and const for default 2019-12-12 18:01:46 +00:00
Ryan Huber f03d895ebf don't steal error 2019-12-12 17:31:22 +00:00
Ryan Huber 9333a8e3b7 subnet support 2019-12-12 16:34:17 +00:00
Ryan Huber 5c99ea26c9 Merge pull request #83 from slackhq/remove_annotations
get rid of the annotation "errors" on github actions
2019-12-11 14:28:42 -06:00
Ryan Huber 1884aec113 get rid of the annotation "errors" on github actions 2019-12-11 20:24:13 +00:00
Ryan Huber ac72d1615a Merge pull request #49 from itorres/patch-1
Fix typo in getting started
2019-12-02 13:13:13 -06:00
Ryan Huber 6039b9f80a Merge pull request #60 from slackhq/yaml_file_rename
rename file to .yml to prevent confusion with example start scripts
2019-12-02 09:37:40 -06:00
Ryan Huber 15e6e0ad30 Merge pull request #3 from slackhq/self_installing_service
make nebula a service that can install itself
2019-12-02 09:37:09 -06:00
Ryan Huber 29c0523714 rename file to .yml to prevent confusion with example start scripts 2019-12-02 15:31:53 +00:00
Ryan Huber 2bff0b266e clean up makefile per wadey comment 2019-12-02 15:26:48 +00:00
Ryan Huber 3fe99aa065 change bin target to use variable for cmd path 2019-11-28 16:20:57 +00:00
Ryan Huber 00d6973e27 remove some boilerplate + better messages 2019-11-28 16:20:57 +00:00
Ryan Huber 8ed69c8eaf make nebula a service that can install itself 2019-11-28 16:20:57 +00:00
Ryan Huber 94441789d5 Merge pull request #41 from slackhq/lighthouse_static_map_error
Add an error (non fatal) when a lighthouse host has no static entry
2019-11-23 18:24:22 -06:00
Ryan Huber 08915315ff add tests and improve error 2019-11-23 23:55:23 +00:00
Ryan Huber 83d2550b2d add an error (non fatal) when a lighthouse host has no static entry 2019-11-23 21:46:45 +00:00
Ryan Huber 72a4e71ebc Merge pull request #35 from slackhq/chachacha
add chachapoly note to example config
2019-11-23 13:36:36 -06:00
Ryan Huber b01e181704 Merge pull request #37 from slackhq/remove_deprecated_hmac
remove old hmac function. superceded by ix_psk0
2019-11-23 13:33:50 -06:00
Ryan Huber 89f0d998cf remove old debug print statements 2019-11-23 17:01:10 +00:00
Ryan Huber 6a460ba38b remove old hmac function. superceded by ix_psk0 2019-11-23 16:50:36 +00:00
Ryan Huber 1dddd370bb Add chachapoly note and HUP note at the top 2019-11-23 15:12:56 +00:00
Ryan Huber ef324bf7e3 Merge pull request #31 from philippgille/patch-1
Fix config comment
2019-11-23 09:04:37 -06:00
Ryan Huber 498e792a46 add hole punching options to example config 2019-11-20 01:24:45 +00:00