mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-24 17:48:57 +00:00
tstest/natlab/vnet: add port mapping that might not work yet
Change-Id: Iaf274d250398973790873534b236d5cbb34fbe0e Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
@@ -58,6 +58,13 @@ func hard(c *vnet.Config) *vnet.Node {
|
||||
fmt.Sprintf("10.0.%d.1/24", n), vnet.HardNAT))
|
||||
}
|
||||
|
||||
func hardPMP(c *vnet.Config) *vnet.Node {
|
||||
n := c.NumNodes() + 1
|
||||
return c.AddNode(c.AddNetwork(
|
||||
fmt.Sprintf("2.%d.%d.%d", n, n, n), // public IP
|
||||
fmt.Sprintf("10.7.%d.1/24", n), vnet.HardNAT, vnet.NATPMP))
|
||||
}
|
||||
|
||||
func (nt *natTest) runTest(node1, node2 addNodeFunc) {
|
||||
t := nt.tb
|
||||
|
||||
@@ -229,3 +236,8 @@ func TestEasyHard(t *testing.T) {
|
||||
nt := newNatTest(t)
|
||||
nt.runTest(easy, hard)
|
||||
}
|
||||
|
||||
func TestEasyHardPMP(t *testing.T) {
|
||||
nt := newNatTest(t)
|
||||
nt.runTest(easy, hardPMP)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user