rename Generic to GenericLink and add missing macvtap

This commit is contained in:
Vishvananda Ishaya 2015-08-18 03:16:06 -07:00
parent b8d3e51d2a
commit 6d78150380
2 changed files with 6 additions and 6 deletions

View File

@ -137,18 +137,18 @@ func (veth *Veth) Type() string {
return "veth"
}
// Generic links represent types that are not currently understood
// GenericLink links represent types that are not currently understood
// by this netlink library.
type Generic struct {
type GenericLink struct {
LinkAttrs
LinkType string
}
func (generic *Generic) Attrs() *LinkAttrs {
func (generic *GenericLink) Attrs() *LinkAttrs {
return &generic.LinkAttrs
}
func (generic *Generic) Type() string {
func (generic *GenericLink) Type() string {
return generic.LinkType
}

View File

@ -508,7 +508,7 @@ func linkDeserialize(m []byte) (Link, error) {
case "macvtap":
link = &Macvtap{}
default:
link = &Generic{LinkType: linkType}
link = &GenericLink{LinkType: linkType}
}
case nl.IFLA_INFO_DATA:
data, err := nl.ParseRouteAttr(info.Value)
@ -522,7 +522,7 @@ func linkDeserialize(m []byte) (Link, error) {
parseVxlanData(link, data)
case "ipvlan":
parseIPVlanData(link, data)
case "macvlan":
case "macvlan", "macvtap":
parseMacvlanData(link, data)
}
}