GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still and

Commit 0bed9c48 authored by Cecylia Bocovich's avatar Cecylia Bocovich

Redefine only symmetric NATs as restricted

parent 61beb9d9
......@@ -16,10 +16,11 @@ package nat
import (
var ErrTimedOut = errors.New("timed out waiting for response")
......@@ -36,16 +37,7 @@ const (
// and false if the NAT is unrestrictive (meaning it
// will work with most other NATs),
func CheckIfRestrictedNAT(server string) (bool, error) {
result, err := isRestrictedMapping(server)
if err != nil {
return false, err
if !result {
// if the mapping is unrestrictive, we still need to check whether
// the filtering is restrictive
result, err = isRestrictedFiltering(server)
return result, err
return isRestrictedMapping(server)
// Performs two tests from RFC 5780 to determine whether the mapping type
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment