Commit b6d9bcb0 authored by YOSHIFUJI Hideaki's avatar YOSHIFUJI Hideaki Committed by David S. Miller

[NET] SCHED: Use htons() where appropriate.

Signed-off-by: default avatarYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8f05ce91
...@@ -160,7 +160,7 @@ static int rsvp_classify(struct sk_buff *skb, struct tcf_proto *tp, ...@@ -160,7 +160,7 @@ static int rsvp_classify(struct sk_buff *skb, struct tcf_proto *tp,
dst = &nhptr->daddr; dst = &nhptr->daddr;
protocol = nhptr->protocol; protocol = nhptr->protocol;
xprt = ((u8*)nhptr) + (nhptr->ihl<<2); xprt = ((u8*)nhptr) + (nhptr->ihl<<2);
if (nhptr->frag_off&__constant_htons(IP_MF|IP_OFFSET)) if (nhptr->frag_off & htons(IP_MF|IP_OFFSET))
return -1; return -1;
#endif #endif
......
...@@ -1146,7 +1146,7 @@ int tc_classify(struct sk_buff *skb, struct tcf_proto *tp, ...@@ -1146,7 +1146,7 @@ int tc_classify(struct sk_buff *skb, struct tcf_proto *tp,
for ( ; tp; tp = tp->next) { for ( ; tp; tp = tp->next) {
if ((tp->protocol == protocol || if ((tp->protocol == protocol ||
tp->protocol == __constant_htons(ETH_P_ALL)) && tp->protocol == htons(ETH_P_ALL)) &&
(err = tp->classify(skb, tp, res)) >= 0) { (err = tp->classify(skb, tp, res)) >= 0) {
#ifdef CONFIG_NET_CLS_ACT #ifdef CONFIG_NET_CLS_ACT
if ( TC_ACT_RECLASSIFY == err) { if ( TC_ACT_RECLASSIFY == err) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment