Update netlink vendoring (#1471)

* github.com/ema/qdisc
* github.com/mdlayher/genetlink
* github.com/mdlayher/wifi

Signed-off-by: Ben Kochie <superq@gmail.com>
This commit is contained in:
Ben Kochie 2019-09-05 15:35:13 +02:00 committed by GitHub
commit 0e77317955
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
245 changed files with 6515 additions and 1699 deletions

View file

@ -8,10 +8,8 @@ import (
"github.com/mdlayher/netlink/nlenc"
)
var (
// errInvalidAttribute specifies if an Attribute's length is incorrect.
errInvalidAttribute = errors.New("invalid attribute; length too short or too large")
)
// errInvalidAttribute specifies if an Attribute's length is incorrect.
var errInvalidAttribute = errors.New("invalid attribute; length too short or too large")
// An Attribute is a netlink attribute. Attributes are packed and unpacked
// to and from the Data field of Message for some netlink families.
@ -180,12 +178,8 @@ func (ad *AttributeDecoder) Next() bool {
ad.i++
if len(ad.attrs) < ad.i {
// No more attributes, stop iteration.
return false
}
return true
// More attributes?
return len(ad.attrs) >= ad.i
}
// Type returns the Attribute.Type field of the current netlink attribute