TUN-6812: Drop IP packets if ICMP proxy is not initialized

This commit is contained in:
cthuang
2022-09-29 15:42:30 +01:00
committed by Chung-Ting Huang
parent 5b30925773
commit eacc8c648d
3 changed files with 24 additions and 31 deletions

View File

@@ -56,7 +56,7 @@ func TestRouterReturnTTLExceed(t *testing.T) {
},
},
}
assertTTLExceed(t, &pk, router.ipv4Src, upstream, returnPipe)
assertTTLExceed(t, &pk, router.globalConfig.IPv4Src, upstream, returnPipe)
pk = ICMP{
IP: &IP{
Src: netip.MustParseAddr("fd51:2391:523:f4ee::1"),
@@ -74,7 +74,7 @@ func TestRouterReturnTTLExceed(t *testing.T) {
},
},
}
assertTTLExceed(t, &pk, router.ipv6Src, upstream, returnPipe)
assertTTLExceed(t, &pk, router.globalConfig.IPv6Src, upstream, returnPipe)
cancel()
<-routerStopped