Closed xiayuhai closed 3 years ago
Env: Router(ipv4+ipv6) , Client(ipv4) With the same USN, ipv4Response was replaced by ipv6Response, which is not effected for ipv4only client. This will be fixed by change seenUSNs[usn] with seenUSNs[location.String()+"/"+usn].
seenUSNs[usn]
seenUSNs[location.String()+"/"+usn]
Code:
usn := response.Header.Get("USN") location, err := response.Location() if err != nil { continue } locusn := location.String() + "/" + usn if _, alreadySeen := seenUSNs[locusn]; !alreadySeen { seenUSNs[locusn] = true responses = append(responses, response) }
Yep, this makes sense. I'm going to make a very similar change to your suggestion. Thanks :)
SSDPRawSearch:
Env: Router(ipv4+ipv6) , Client(ipv4) With the same USN, ipv4Response was replaced by ipv6Response, which is not effected for ipv4only client. This will be fixed by change
seenUSNs[usn]
withseenUSNs[location.String()+"/"+usn]
.Code: