lkml.org 
[lkml]   [1999]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectBug in net/ethernet/eth.c ??
Found in file:  net/ethernet/eth.c, at line#  178 in release 2.1.131...
(Check out the last line of quoted code.)


unsigned short eth_type_trans(struct sk_buff *skb, struct device *dev)
{
struct ethhdr *eth;
unsigned char *rawp;

skb->mac.raw=skb->data;
skb_pull(skb,dev->hard_header_len);
eth= skb->mac.ethernet;

if(*eth->h_dest&1)
{
if(memcmp(eth->h_dest,dev->broadcast, ETH_ALEN)==0)
skb->pkt_type=PACKET_BROADCAST;
else
skb->pkt_type=PACKET_MULTICAST;
}

/*
* This ALLMULTI check should be redundant by 1.4
* so don't forget to remove it.
*
* Seems, you forgot to remove it. All silly devices
* seems to set IFF_PROMISC.
*/

else if(dev->flags&(IFF_PROMISC/*|IFF_ALLMULTI*/))
{
if(memcmp(eth->h_dest,dev->dev_addr, ETH_ALEN))
skb->pkt_type=PACKET_OTHERHOST;
}

if (ntohs(eth->h_proto) >= 1536)
return eth->h_proto;

...

I wonder if that last line should be more like:
return (ntohs(eth->h_proto);


--
Ben Greear (greear@cyberhighway.net) http://www.primenet.com/~greear
Author of ScryMUD: mud.primenet.com 4444
http://www.primenet.com/~greear/ScryMUD/scry.html

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.056 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site