[PATCH] e1000: fix for dhcp issue

Parse outgoing packets in e1000_transfer_dhcp_info as raw packet even if
protocol bits are set. pump, for instance causes kernel panic on some
systems, if parsed via udp header.

Thanks to Derrell Lipman <Derrell.Lipman@BacklotTech.com> for reporting and
testing.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>

authored by Jesse Brandeburg and committed by Jeff Garzik a174fd88 d5366d9e

+1 -13
+1 -13
drivers/net/e1000/e1000_main.c
··· 2621 2621 E1000_MNG_DHCP_COOKIE_STATUS_VLAN_SUPPORT)) ) 2622 2622 return 0; 2623 2623 } 2624 - if(htons(ETH_P_IP) == skb->protocol) { 2625 - const struct iphdr *ip = skb->nh.iph; 2626 - if(IPPROTO_UDP == ip->protocol) { 2627 - struct udphdr *udp = (struct udphdr *)(skb->h.uh); 2628 - if(ntohs(udp->dest) == 67) { 2629 - offset = (uint8_t *)udp + 8 - skb->data; 2630 - length = skb->len - offset; 2631 - 2632 - return e1000_mng_write_dhcp_info(hw, 2633 - (uint8_t *)udp + 8, length); 2634 - } 2635 - } 2636 - } else if((skb->len > MINIMUM_DHCP_PACKET_SIZE) && (!skb->protocol)) { 2624 + if ((skb->len > MINIMUM_DHCP_PACKET_SIZE) && (!skb->protocol)) { 2637 2625 struct ethhdr *eth = (struct ethhdr *) skb->data; 2638 2626 if((htons(ETH_P_IP) == eth->h_proto)) { 2639 2627 const struct iphdr *ip =