[IPVS]: Use htons() where appropriate.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
YOSHIFUJI Hideaki 2007-12-12 03:53:11 +09:00 committed by David S. Miller
parent 4e39430ae3
commit 5661df7b6c
2 changed files with 9 additions and 9 deletions

View File

@ -165,7 +165,7 @@ ip_vs_tcpudp_debug_packet(struct ip_vs_protocol *pp,
ih = skb_header_pointer(skb, offset, sizeof(_iph), &_iph);
if (ih == NULL)
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",
pp->name, NIPQUAD(ih->saddr),
NIPQUAD(ih->daddr));

View File

@ -52,15 +52,15 @@ esp_conn_in_get(const struct sk_buff *skb,
if (likely(!inverse)) {
cp = ip_vs_conn_in_get(IPPROTO_UDP,
iph->saddr,
__constant_htons(PORT_ISAKMP),
htons(PORT_ISAKMP),
iph->daddr,
__constant_htons(PORT_ISAKMP));
htons(PORT_ISAKMP));
} else {
cp = ip_vs_conn_in_get(IPPROTO_UDP,
iph->daddr,
__constant_htons(PORT_ISAKMP),
htons(PORT_ISAKMP),
iph->saddr,
__constant_htons(PORT_ISAKMP));
htons(PORT_ISAKMP));
}
if (!cp) {
@ -89,15 +89,15 @@ esp_conn_out_get(const struct sk_buff *skb, struct ip_vs_protocol *pp,
if (likely(!inverse)) {
cp = ip_vs_conn_out_get(IPPROTO_UDP,
iph->saddr,
__constant_htons(PORT_ISAKMP),
htons(PORT_ISAKMP),
iph->daddr,
__constant_htons(PORT_ISAKMP));
htons(PORT_ISAKMP));
} else {
cp = ip_vs_conn_out_get(IPPROTO_UDP,
iph->daddr,
__constant_htons(PORT_ISAKMP),
htons(PORT_ISAKMP),
iph->saddr,
__constant_htons(PORT_ISAKMP));
htons(PORT_ISAKMP));
}
if (!cp) {