FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 08-20-2012, 03:54 AM
"Jesse Sung"
 
Default be2net: Fix Endian

From: Li RongQing <roy.qing.li@gmail.com>

BugLink: https://launchpad.net/bugs/1035348

ETH_P_IP is host Endian, skb->protocol is big Endian, when
compare them, we should change ETH_P_IP from host endian
to big endian, htons, not ntohs.

CC: Somnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Acked-by: Somnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit e8efcec5394cbf7ae67ccb137cb1a45ae3e6f6c8)
Signed-off-by: Wen-chien Jesse Sung <jesse.sung@canonical.com>
---
drivers/net/ethernet/emulex/benet/be.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h
index a244f2f..2a64de3 100644
--- a/drivers/net/ethernet/emulex/benet/be.h
+++ b/drivers/net/ethernet/emulex/benet/be.h
@@ -518,7 +518,7 @@ static inline void be_check_sriov_fn_type(struct be_adapter *adapter)

static inline bool is_ipv4_pkt(struct sk_buff *skb)
{
- return skb->protocol == ntohs(ETH_P_IP) && ip_hdr(skb)->version == 4;
+ return skb->protocol == htons(ETH_P_IP) && ip_hdr(skb)->version == 4;
}

static inline void be_vf_eth_addr_generate(struct be_adapter *adapter, u8 *mac)
--
1.7.9.5


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 

Thread Tools




All times are GMT. The time now is 11:33 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org