Use binary.BigEndian.PutUint32 in EDNS0_EXPIRE.pack (#875)
This commit is contained in:
parent
67bd05e2f4
commit
ac5c421c48
5
edns.go
5
edns.go
|
@ -498,10 +498,7 @@ func (e *EDNS0_EXPIRE) String() string { return strconv.FormatUint(uint64(e.Expi
|
|||
|
||||
func (e *EDNS0_EXPIRE) pack() ([]byte, error) {
|
||||
b := make([]byte, 4)
|
||||
b[0] = byte(e.Expire >> 24)
|
||||
b[1] = byte(e.Expire >> 16)
|
||||
b[2] = byte(e.Expire >> 8)
|
||||
b[3] = byte(e.Expire)
|
||||
binary.BigEndian.PutUint32(b, e.Expire)
|
||||
return b, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue