Not a real bug since htons() and ntohs() do the same thing on all
interesting target platforms.
Found by sparse.
}
/* Trim off padding on payload. */
- if (payload.size > htons(eth->eth_type) + ETH_HEADER_LEN) {
- payload.size = htons(eth->eth_type) + ETH_HEADER_LEN;
+ if (payload.size > ntohs(eth->eth_type) + ETH_HEADER_LEN) {
+ payload.size = ntohs(eth->eth_type) + ETH_HEADER_LEN;
}
if (ofpbuf_try_pull(&payload, ETH_HEADER_LEN + LLC_HEADER_LEN)) {