mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-11-22 19:44:36 +00:00
hack/update-vendor.sh
This commit is contained in:
11
vendor/golang.org/x/net/ipv4/header.go
generated
vendored
11
vendor/golang.org/x/net/ipv4/header.go
generated
vendored
@@ -57,7 +57,7 @@ func (h *Header) String() string {
|
||||
// This may differ from the wire format, depending on the system.
|
||||
func (h *Header) Marshal() ([]byte, error) {
|
||||
if h == nil {
|
||||
return nil, errInvalidConn
|
||||
return nil, errNilHeader
|
||||
}
|
||||
if h.Len < HeaderLen {
|
||||
return nil, errHeaderTooShort
|
||||
@@ -107,12 +107,15 @@ func (h *Header) Marshal() ([]byte, error) {
|
||||
// local system.
|
||||
// This may differ from the wire format, depending on the system.
|
||||
func (h *Header) Parse(b []byte) error {
|
||||
if h == nil || len(b) < HeaderLen {
|
||||
if h == nil || b == nil {
|
||||
return errNilHeader
|
||||
}
|
||||
if len(b) < HeaderLen {
|
||||
return errHeaderTooShort
|
||||
}
|
||||
hdrlen := int(b[0]&0x0f) << 2
|
||||
if hdrlen > len(b) {
|
||||
return errBufferTooShort
|
||||
if len(b) < hdrlen {
|
||||
return errExtHeaderTooShort
|
||||
}
|
||||
h.Version = int(b[0] >> 4)
|
||||
h.Len = hdrlen
|
||||
|
||||
Reference in New Issue
Block a user