diff options
Diffstat (limited to 'net/core/rtnetlink.c')
| -rw-r--r-- | net/core/rtnetlink.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index b376410ff259..5fb8d7e47294 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
| @@ -979,6 +979,7 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev, | |||
| 979 | * report anything. | 979 | * report anything. |
| 980 | */ | 980 | */ |
| 981 | ivi.spoofchk = -1; | 981 | ivi.spoofchk = -1; |
| 982 | memset(ivi.mac, 0, sizeof(ivi.mac)); | ||
| 982 | if (dev->netdev_ops->ndo_get_vf_config(dev, i, &ivi)) | 983 | if (dev->netdev_ops->ndo_get_vf_config(dev, i, &ivi)) |
| 983 | break; | 984 | break; |
| 984 | vf_mac.vf = | 985 | vf_mac.vf = |
| @@ -2620,7 +2621,7 @@ static int rtnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) | |||
| 2620 | struct rtattr *attr = (void *)nlh + NLMSG_ALIGN(min_len); | 2621 | struct rtattr *attr = (void *)nlh + NLMSG_ALIGN(min_len); |
| 2621 | 2622 | ||
| 2622 | while (RTA_OK(attr, attrlen)) { | 2623 | while (RTA_OK(attr, attrlen)) { |
| 2623 | unsigned int flavor = attr->rta_type; | 2624 | unsigned int flavor = attr->rta_type & NLA_TYPE_MASK; |
| 2624 | if (flavor) { | 2625 | if (flavor) { |
| 2625 | if (flavor > rta_max[sz_idx]) | 2626 | if (flavor > rta_max[sz_idx]) |
| 2626 | return -EINVAL; | 2627 | return -EINVAL; |
