diff options
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 7 | ||||
-rw-r--r-- | net/core/rtnetlink.c | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index a06a7a58dd11..d540ced1f6c6 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -2219,9 +2219,9 @@ struct sk_buff *skb_mac_gso_segment(struct sk_buff *skb, | |||
2219 | struct sk_buff *segs = ERR_PTR(-EPROTONOSUPPORT); | 2219 | struct sk_buff *segs = ERR_PTR(-EPROTONOSUPPORT); |
2220 | struct packet_offload *ptype; | 2220 | struct packet_offload *ptype; |
2221 | __be16 type = skb->protocol; | 2221 | __be16 type = skb->protocol; |
2222 | int vlan_depth = ETH_HLEN; | ||
2222 | 2223 | ||
2223 | while (type == htons(ETH_P_8021Q)) { | 2224 | while (type == htons(ETH_P_8021Q)) { |
2224 | int vlan_depth = ETH_HLEN; | ||
2225 | struct vlan_hdr *vh; | 2225 | struct vlan_hdr *vh; |
2226 | 2226 | ||
2227 | if (unlikely(!pskb_may_pull(skb, vlan_depth + VLAN_HLEN))) | 2227 | if (unlikely(!pskb_may_pull(skb, vlan_depth + VLAN_HLEN))) |
@@ -3444,6 +3444,7 @@ ncls: | |||
3444 | } | 3444 | } |
3445 | switch (rx_handler(&skb)) { | 3445 | switch (rx_handler(&skb)) { |
3446 | case RX_HANDLER_CONSUMED: | 3446 | case RX_HANDLER_CONSUMED: |
3447 | ret = NET_RX_SUCCESS; | ||
3447 | goto unlock; | 3448 | goto unlock; |
3448 | case RX_HANDLER_ANOTHER: | 3449 | case RX_HANDLER_ANOTHER: |
3449 | goto another_round; | 3450 | goto another_round; |
@@ -4103,7 +4104,7 @@ static void net_rx_action(struct softirq_action *h) | |||
4103 | * Allow this to run for 2 jiffies since which will allow | 4104 | * Allow this to run for 2 jiffies since which will allow |
4104 | * an average latency of 1.5/HZ. | 4105 | * an average latency of 1.5/HZ. |
4105 | */ | 4106 | */ |
4106 | if (unlikely(budget <= 0 || time_after(jiffies, time_limit))) | 4107 | if (unlikely(budget <= 0 || time_after_eq(jiffies, time_limit))) |
4107 | goto softnet_break; | 4108 | goto softnet_break; |
4108 | 4109 | ||
4109 | local_irq_enable(); | 4110 | local_irq_enable(); |
@@ -4780,7 +4781,7 @@ EXPORT_SYMBOL(dev_set_mac_address); | |||
4780 | /** | 4781 | /** |
4781 | * dev_change_carrier - Change device carrier | 4782 | * dev_change_carrier - Change device carrier |
4782 | * @dev: device | 4783 | * @dev: device |
4783 | * @new_carries: new value | 4784 | * @new_carrier: new value |
4784 | * | 4785 | * |
4785 | * Change device carrier | 4786 | * Change device carrier |
4786 | */ | 4787 | */ |
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; |