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
265 B
Go
21 lines
265 B
Go
// +build arm mips mipsle 386
|
|
// +build linux
|
|
|
|
package socket
|
|
|
|
type cmsghdr struct {
|
|
Len uint32
|
|
Level int32
|
|
Type int32
|
|
}
|
|
|
|
const (
|
|
sizeofCmsghdr = 0xc
|
|
)
|
|
|
|
func (h *cmsghdr) set(l, lvl, typ int) {
|
|
h.Len = uint32(l)
|
|
h.Level = int32(lvl)
|
|
h.Type = int32(typ)
|
|
}
|