Commit 20a44028 authored by Jeff Kirsher's avatar Jeff Kirsher Committed by root

e1000: Fix dhcp issue when the skb structure fields are not filled properly

Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: default avatarJohn Ronciak <john.ronciak@intel.com>
parent c5f226fe
...@@ -2678,7 +2678,7 @@ e1000_transfer_dhcp_info(struct e1000_adapter *adapter, struct sk_buff *skb) ...@@ -2678,7 +2678,7 @@ e1000_transfer_dhcp_info(struct e1000_adapter *adapter, struct sk_buff *skb)
E1000_MNG_DHCP_COOKIE_STATUS_VLAN_SUPPORT)) ) E1000_MNG_DHCP_COOKIE_STATUS_VLAN_SUPPORT)) )
return 0; return 0;
} }
if ((skb->len > MINIMUM_DHCP_PACKET_SIZE) && (!skb->protocol)) { if (skb->len > MINIMUM_DHCP_PACKET_SIZE) {
struct ethhdr *eth = (struct ethhdr *) skb->data; struct ethhdr *eth = (struct ethhdr *) skb->data;
if ((htons(ETH_P_IP) == eth->h_proto)) { if ((htons(ETH_P_IP) == eth->h_proto)) {
const struct iphdr *ip = const struct iphdr *ip =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment