Fix: remove host if host is ip string

This commit is contained in:
gVisor bot 2021-03-10 12:11:45 +08:00
parent 8f09aa0444
commit 9b229b15e7

View file

@ -121,6 +121,7 @@ func preHandleMetadata(metadata *C.Metadata) error {
// handle IP string on host // handle IP string on host
if ip := net.ParseIP(metadata.Host); ip != nil { if ip := net.ParseIP(metadata.Host); ip != nil {
metadata.DstIP = ip metadata.DstIP = ip
metadata.Host = ""
} }
// preprocess enhanced-mode metadata // preprocess enhanced-mode metadata