tun_disabled: reply to ICMP Echo Request (#342)

This change allows a server running with `tun.disabled: true` (usually
a lighthouse) to still reply to ICMP EchoRequest packets. This allows
you to "ping" the lighthouse Nebula IP as a quick check to make sure the
tunnel is up, even when running with tun.disabled.

This is still gated by allowing `icmp` packets in the inbound firewall
rules.
This commit is contained in:
Wade Simmons
2021-03-01 11:09:41 -05:00
committed by GitHub
parent 27d9a67dda
commit a0583ebdca
2 changed files with 108 additions and 11 deletions

View File

@ -123,7 +123,7 @@ func Main(config *Config, configTest bool, buildVersion string, logger *logrus.L
switch {
case config.GetBool("tun.disabled", false):
tun = newDisabledTun(tunCidr, l)
tun = newDisabledTun(tunCidr, config.GetInt("tun.tx_queue", 500), config.GetBool("stats.message_metrics", false), l)
case tunFd != nil:
tun, err = newTunFromFd(
*tunFd,