提交 5661df7b 编写于 作者: Y YOSHIFUJI Hideaki 提交者: David S. Miller

[IPVS]: Use htons() where appropriate.

Signed-off-by: NYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 4e39430a
...@@ -165,7 +165,7 @@ ip_vs_tcpudp_debug_packet(struct ip_vs_protocol *pp, ...@@ -165,7 +165,7 @@ ip_vs_tcpudp_debug_packet(struct ip_vs_protocol *pp,
ih = skb_header_pointer(skb, offset, sizeof(_iph), &_iph); ih = skb_header_pointer(skb, offset, sizeof(_iph), &_iph);
if (ih == NULL) if (ih == NULL)
sprintf(buf, "%s TRUNCATED", pp->name); sprintf(buf, "%s TRUNCATED", pp->name);
else if (ih->frag_off & __constant_htons(IP_OFFSET)) else if (ih->frag_off & htons(IP_OFFSET))
sprintf(buf, "%s %u.%u.%u.%u->%u.%u.%u.%u frag", sprintf(buf, "%s %u.%u.%u.%u->%u.%u.%u.%u frag",
pp->name, NIPQUAD(ih->saddr), pp->name, NIPQUAD(ih->saddr),
NIPQUAD(ih->daddr)); NIPQUAD(ih->daddr));
......
...@@ -52,15 +52,15 @@ esp_conn_in_get(const struct sk_buff *skb, ...@@ -52,15 +52,15 @@ esp_conn_in_get(const struct sk_buff *skb,
if (likely(!inverse)) { if (likely(!inverse)) {
cp = ip_vs_conn_in_get(IPPROTO_UDP, cp = ip_vs_conn_in_get(IPPROTO_UDP,
iph->saddr, iph->saddr,
__constant_htons(PORT_ISAKMP), htons(PORT_ISAKMP),
iph->daddr, iph->daddr,
__constant_htons(PORT_ISAKMP)); htons(PORT_ISAKMP));
} else { } else {
cp = ip_vs_conn_in_get(IPPROTO_UDP, cp = ip_vs_conn_in_get(IPPROTO_UDP,
iph->daddr, iph->daddr,
__constant_htons(PORT_ISAKMP), htons(PORT_ISAKMP),
iph->saddr, iph->saddr,
__constant_htons(PORT_ISAKMP)); htons(PORT_ISAKMP));
} }
if (!cp) { if (!cp) {
...@@ -89,15 +89,15 @@ esp_conn_out_get(const struct sk_buff *skb, struct ip_vs_protocol *pp, ...@@ -89,15 +89,15 @@ esp_conn_out_get(const struct sk_buff *skb, struct ip_vs_protocol *pp,
if (likely(!inverse)) { if (likely(!inverse)) {
cp = ip_vs_conn_out_get(IPPROTO_UDP, cp = ip_vs_conn_out_get(IPPROTO_UDP,
iph->saddr, iph->saddr,
__constant_htons(PORT_ISAKMP), htons(PORT_ISAKMP),
iph->daddr, iph->daddr,
__constant_htons(PORT_ISAKMP)); htons(PORT_ISAKMP));
} else { } else {
cp = ip_vs_conn_out_get(IPPROTO_UDP, cp = ip_vs_conn_out_get(IPPROTO_UDP,
iph->daddr, iph->daddr,
__constant_htons(PORT_ISAKMP), htons(PORT_ISAKMP),
iph->saddr, iph->saddr,
__constant_htons(PORT_ISAKMP)); htons(PORT_ISAKMP));
} }
if (!cp) { if (!cp) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册