Use NextHeader as a fallback for unknown IPv6 protocols

This commit is contained in:
Patrick Pacher
2020-07-31 15:15:38 +02:00
parent 9639775ad7
commit 4d56752989
3 changed files with 17 additions and 48 deletions

View File

@@ -1,6 +1,7 @@
package firewall
import (
"context"
"sync"
"time"
@@ -69,11 +70,11 @@ func GetPermittedPort() uint16 {
return 0
}
func portsInUseCleaner() {
func portsInUseCleaner(ctx context.Context) error {
for {
select {
case <-interceptionModule.Stopping():
return
case <-ctx.Done():
return nil
case <-time.After(cleanerTickDuration):
cleanPortsInUse()
}