Fix: PROCESS-NAME rule for UDP sessions on Windows (#1140)

This commit is contained in:
gVisor bot 2020-12-22 15:13:44 +08:00
parent e063713174
commit 1e9d9e6d03

View file

@ -133,7 +133,8 @@ func (s *searcher) Search(b []byte, ip net.IP, port uint16) (uint32, error) {
}
srcIP := net.IP(row[s.ip : s.ip+s.ipSize])
if !ip.Equal(srcIP) {
// windows binds an unbound udp socket to 0.0.0.0/[::] while first sendto
if !ip.Equal(srcIP) && (!srcIP.IsUnspecified() || s.tcpState != -1) {
continue
}