You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/wgengine
Avery Pennarun a496cdc943 router_linux: remove need for iptables.ListChains().
Instead of retrieving the list of chains, or the list of rules in a
chain, just try deleting the ones we don't want and then adding the
ones we do want. An error in flushing/deleting still means the rule
doesn't exist anymore, so there was no need to check for it first.

This avoids the need to parse iptables output, which avoids the need to
ever call iptables -S, which fixes #403, among other things. It's also
much more future proof in case the iptables command line changes.

Unfortunately the iptables go module doesn't properly pass the iptables
command exit code back up when doing .Delete(), so we can't correctly
check the exit code there. (exit code 1 really means the rule didn't
exist, rather than some other weird problem).

Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
4 years ago
..
filter wgengine/filter: implement a destination IP pre-filter. 4 years ago
magicsock magicsock: work around race condition initializing .Regions[]. 4 years ago
monitor wgengine/monitor: disable monitor on Android 4 years ago
packet wgengine/packet: add some tests, more docs, minor Go style, performance changes 4 years ago
router router_linux: remove need for iptables.ListChains(). 4 years ago
tstun tstun: tolerate zero reads 4 years ago
winnet Move Linux client & common packages into a public repo. 4 years ago
rusage.go Move "logger" package to under types, now that we have it. 4 years ago
rusage_nowindows.go wgengine: flesh out some docs 4 years ago
rusage_windows.go Move Linux client & common packages into a public repo. 4 years ago
userspace.go wgengine/packet: add some tests, more docs, minor Go style, performance changes 4 years ago
watchdog.go all: make client use server-provided DERP map, add DERP region support 4 years ago
watchdog_test.go wgengine: wrap tun.Device to support filtering and packet injection (#358) 4 years ago
wgengine.go all: make client use server-provided DERP map, add DERP region support 4 years ago