update vendor/ dir to latest w/o heroku, moby

had to lock a lot of things in place
This commit is contained in:
Reed Allman
2017-08-03 02:38:15 -07:00
parent 780791da1c
commit 30f3c45dbc
5637 changed files with 191713 additions and 1133103 deletions

View File

@@ -4,7 +4,10 @@
package icmp
import "golang.org/x/net/internal/iana"
import (
"encoding/binary"
"golang.org/x/net/internal/iana"
)
// A ParamProb represents an ICMP parameter problem message body.
type ParamProb struct {
@@ -26,7 +29,7 @@ func (p *ParamProb) Len(proto int) int {
func (p *ParamProb) Marshal(proto int) ([]byte, error) {
if proto == iana.ProtocolIPv6ICMP {
b := make([]byte, p.Len(proto))
b[0], b[1], b[2], b[3] = byte(p.Pointer>>24), byte(p.Pointer>>16), byte(p.Pointer>>8), byte(p.Pointer)
binary.BigEndian.PutUint32(b[:4], uint32(p.Pointer))
copy(b[4:], p.Data)
return b, nil
}
@@ -45,7 +48,7 @@ func parseParamProb(proto int, b []byte) (MessageBody, error) {
}
p := &ParamProb{}
if proto == iana.ProtocolIPv6ICMP {
p.Pointer = uintptr(b[0])<<24 | uintptr(b[1])<<16 | uintptr(b[2])<<8 | uintptr(b[3])
p.Pointer = uintptr(binary.BigEndian.Uint32(b[:4]))
p.Data = make([]byte, len(b)-4)
copy(p.Data, b[4:])
return p, nil