Fix: remove host if host is ip string

This commit is contained in:
Dreamacro 2021-03-10 12:11:45 +08:00
parent f53686103d
commit 5acdd72a1d

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