mirror of
https://github.com/miekg/dns.git
synced 2025-10-11 01:41:00 +02:00
Previously, the oob data was just stored and sent to WriteMsgUDP but it ignores the Src field when writing. Instead, now it is setting the Src to the original Dst and handling IPv4 IPs over IPv6 correctly.
21 lines
294 B
Go
21 lines
294 B
Go
// +build arm64 amd64 ppc64 ppc64le mips64 mips64le s390x
|
|
// +build linux
|
|
|
|
package socket
|
|
|
|
type cmsghdr struct {
|
|
Len uint64
|
|
Level int32
|
|
Type int32
|
|
}
|
|
|
|
const (
|
|
sizeofCmsghdr = 0x10
|
|
)
|
|
|
|
func (h *cmsghdr) set(l, lvl, typ int) {
|
|
h.Len = uint64(l)
|
|
h.Level = int32(lvl)
|
|
h.Type = int32(typ)
|
|
}
|