diff options
author | Jesse Brandeburg <jesse.brandeburg@intel.com> | 2005-11-29 19:23:59 -0800 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-12-01 02:10:11 -0500 |
commit | a174fd88d2b73c1933ea24ed533354d618c7d089 (patch) | |
tree | 63adc36cb31653534dd2c751d7b6261317e60676 /drivers/net | |
parent | d5366d9e24d1e864e48e1705c9b7c21cfc0e9cea (diff) |
[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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 8b207f0e139..e0ae248b431 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -2621,19 +2621,7 @@ e1000_transfer_dhcp_info(struct e1000_adapter *adapter, struct sk_buff *skb) E1000_MNG_DHCP_COOKIE_STATUS_VLAN_SUPPORT)) ) return 0; } - if(htons(ETH_P_IP) == skb->protocol) { - const struct iphdr *ip = skb->nh.iph; - if(IPPROTO_UDP == ip->protocol) { - struct udphdr *udp = (struct udphdr *)(skb->h.uh); - if(ntohs(udp->dest) == 67) { - offset = (uint8_t *)udp + 8 - skb->data; - length = skb->len - offset; - - return e1000_mng_write_dhcp_info(hw, - (uint8_t *)udp + 8, length); - } - } - } else if((skb->len > MINIMUM_DHCP_PACKET_SIZE) && (!skb->protocol)) { + if ((skb->len > MINIMUM_DHCP_PACKET_SIZE) && (!skb->protocol)) { struct ethhdr *eth = (struct ethhdr *) skb->data; if((htons(ETH_P_IP) == eth->h_proto)) { const struct iphdr *ip = |