Messages in this thread | | | Subject | Re: Bug in net/ethernet/eth.c ?? | From | Andi Kleen <> | Date | 12 Jan 1999 17:26:02 +0100 |
| |
In article <369ACC40.8E390A0C@cyberhighway.net>, greear@cyberhighway.net (Ben Greear) writes:
> 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);
The line is correct because the kernel internally uses network order for comparing/storing the protocol number (and most other network constants like ip addresses . The ntohs() above is just for the numerical comparison.
If this line was buggy not much would work in networking @)
-Andi
- 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/
| |