[PATCH] net/core: use htons for skb->protocol

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Sebastian Andrzej Siewior
Date: Tuesday, June 29, 2010 - 9:32 am

From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

This is only noticed by people that are not doing everything correct in
the first place.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 net/core/dev.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index 2b3bf53..78ad37c 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1541,7 +1541,8 @@ static void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev)
 				if (net_ratelimit())
 					printk(KERN_CRIT "protocol %04x is "
 					       "buggy, dev %s\n",
-					       skb2->protocol, dev->name);
+					       htons(skb2->protocol),
+					       dev->name);
 				skb_reset_network_header(skb2);
 			}
 
-- 
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] net/core: use htons for skb->protocol, Sebastian Andrzej Si ..., (Tue Jun 29, 9:32 am)
Re: [PATCH] net/core: use htons for skb-&gt;protocol, David Miller, (Tue Jun 29, 3:17 pm)
Re: [PATCH] net/core: use htons for skb-&gt;protocol, David Daney, (Tue Jun 29, 3:19 pm)
[PATCH v2] net/core: use ntohs for skb-&gt;protocol, Sebastian Andrzej Si ..., (Wed Jun 30, 2:02 am)
Re: [PATCH v2] net/core: use ntohs for skb-&gt;protocol, David Miller, (Wed Jun 30, 10:39 am)