Bump all vendoring (#1612)
Update all vendoring to current releases. Signed-off-by: Ben Kochie <superq@gmail.com>
This commit is contained in:
parent
14df2a1a1a
commit
1567cefdae
511 changed files with 98653 additions and 38115 deletions
43
vendor/github.com/mdlayher/genetlink/family_linux.go
generated
vendored
43
vendor/github.com/mdlayher/genetlink/family_linux.go
generated
vendored
|
|
@ -111,13 +111,8 @@ func (f *Family) parseAttributes(b []byte) error {
|
|||
|
||||
f.Version = uint8(v)
|
||||
case unix.CTRL_ATTR_MCAST_GROUPS:
|
||||
ad.Do(func(b []byte) error {
|
||||
groups, err := parseMulticastGroups(b)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
f.Groups = groups
|
||||
ad.Nested(func(nad *netlink.AttributeDecoder) error {
|
||||
f.Groups = parseMulticastGroups(nad)
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
|
@ -128,42 +123,24 @@ func (f *Family) parseAttributes(b []byte) error {
|
|||
|
||||
// parseMulticastGroups parses an array of multicast group nested attributes
|
||||
// into a slice of MulticastGroups.
|
||||
func parseMulticastGroups(b []byte) ([]MulticastGroup, error) {
|
||||
ad, err := netlink.NewAttributeDecoder(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var groups []MulticastGroup
|
||||
func parseMulticastGroups(ad *netlink.AttributeDecoder) []MulticastGroup {
|
||||
groups := make([]MulticastGroup, 0, ad.Len())
|
||||
for ad.Next() {
|
||||
ad.Do(func(b []byte) error {
|
||||
adi, err := netlink.NewAttributeDecoder(b)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
ad.Nested(func(nad *netlink.AttributeDecoder) error {
|
||||
var g MulticastGroup
|
||||
for adi.Next() {
|
||||
switch adi.Type() {
|
||||
for nad.Next() {
|
||||
switch nad.Type() {
|
||||
case unix.CTRL_ATTR_MCAST_GRP_NAME:
|
||||
g.Name = adi.String()
|
||||
g.Name = nad.String()
|
||||
case unix.CTRL_ATTR_MCAST_GRP_ID:
|
||||
g.ID = adi.Uint32()
|
||||
g.ID = nad.Uint32()
|
||||
}
|
||||
}
|
||||
|
||||
if err := ad.Err(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
groups = append(groups, g)
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
||||
if err := ad.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return groups, nil
|
||||
return groups
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue