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

@@ -14,6 +14,7 @@
package icmp // import "golang.org/x/net/icmp"
import (
"encoding/binary"
"errors"
"net"
"syscall"
@@ -94,7 +95,7 @@ func (m *Message) Marshal(psh []byte) ([]byte, error) {
return b, nil
}
off, l := 2*net.IPv6len, len(b)-len(psh)
b[off], b[off+1], b[off+2], b[off+3] = byte(l>>24), byte(l>>16), byte(l>>8), byte(l)
binary.BigEndian.PutUint32(b[off:off+4], uint32(l))
}
s := checksum(b)
// Place checksum back in header; using ^= avoids the
@@ -128,7 +129,7 @@ func ParseMessage(proto int, b []byte) (*Message, error) {
return nil, errMessageTooShort
}
var err error
m := &Message{Code: int(b[1]), Checksum: int(b[2])<<8 | int(b[3])}
m := &Message{Code: int(b[1]), Checksum: int(binary.BigEndian.Uint16(b[2:4]))}
switch proto {
case iana.ProtocolICMP:
m.Type = ipv4.ICMPType(b[0])