aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ipvs/ip_vs_xmit.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2007-03-07 00:19:10 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:23:58 -0400
commit4412ec494868160d57da6e436a92b0696f40b19d (patch)
tree91bb2477d22a95801a5c487349e89acb464793ec /net/ipv4/ipvs/ip_vs_xmit.c
parent1c9e8ef7f731c2548414644e5bf540c38c85aff0 (diff)
[NET] IPV4: Use hton{s,l}() where appropriate.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ipvs/ip_vs_xmit.c')
-rw-r--r--net/ipv4/ipvs/ip_vs_xmit.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/ipv4/ipvs/ip_vs_xmit.c b/net/ipv4/ipvs/ip_vs_xmit.c
index e1f77bd7c9a5..f73c5acf5dd1 100644
--- a/net/ipv4/ipvs/ip_vs_xmit.c
+++ b/net/ipv4/ipvs/ip_vs_xmit.c
@@ -178,7 +178,7 @@ ip_vs_bypass_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
178 178
179 /* MTU checking */ 179 /* MTU checking */
180 mtu = dst_mtu(&rt->u.dst); 180 mtu = dst_mtu(&rt->u.dst);
181 if ((skb->len > mtu) && (iph->frag_off&__constant_htons(IP_DF))) { 181 if ((skb->len > mtu) && (iph->frag_off & htons(IP_DF))) {
182 ip_rt_put(rt); 182 ip_rt_put(rt);
183 icmp_send(skb, ICMP_DEST_UNREACH,ICMP_FRAG_NEEDED, htonl(mtu)); 183 icmp_send(skb, ICMP_DEST_UNREACH,ICMP_FRAG_NEEDED, htonl(mtu));
184 IP_VS_DBG_RL("ip_vs_bypass_xmit(): frag needed\n"); 184 IP_VS_DBG_RL("ip_vs_bypass_xmit(): frag needed\n");
@@ -245,7 +245,7 @@ ip_vs_nat_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
245 245
246 /* MTU checking */ 246 /* MTU checking */
247 mtu = dst_mtu(&rt->u.dst); 247 mtu = dst_mtu(&rt->u.dst);
248 if ((skb->len > mtu) && (iph->frag_off&__constant_htons(IP_DF))) { 248 if ((skb->len > mtu) && (iph->frag_off & htons(IP_DF))) {
249 ip_rt_put(rt); 249 ip_rt_put(rt);
250 icmp_send(skb, ICMP_DEST_UNREACH,ICMP_FRAG_NEEDED, htonl(mtu)); 250 icmp_send(skb, ICMP_DEST_UNREACH,ICMP_FRAG_NEEDED, htonl(mtu));
251 IP_VS_DBG_RL_PKT(0, pp, skb, 0, "ip_vs_nat_xmit(): frag needed for"); 251 IP_VS_DBG_RL_PKT(0, pp, skb, 0, "ip_vs_nat_xmit(): frag needed for");
@@ -329,10 +329,10 @@ ip_vs_tunnel_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
329 329
330 EnterFunction(10); 330 EnterFunction(10);
331 331
332 if (skb->protocol != __constant_htons(ETH_P_IP)) { 332 if (skb->protocol != htons(ETH_P_IP)) {
333 IP_VS_DBG_RL("ip_vs_tunnel_xmit(): protocol error, " 333 IP_VS_DBG_RL("ip_vs_tunnel_xmit(): protocol error, "
334 "ETH_P_IP: %d, skb protocol: %d\n", 334 "ETH_P_IP: %d, skb protocol: %d\n",
335 __constant_htons(ETH_P_IP), skb->protocol); 335 htons(ETH_P_IP), skb->protocol);
336 goto tx_error; 336 goto tx_error;
337 } 337 }
338 338
@@ -350,9 +350,9 @@ ip_vs_tunnel_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
350 if (skb->dst) 350 if (skb->dst)
351 skb->dst->ops->update_pmtu(skb->dst, mtu); 351 skb->dst->ops->update_pmtu(skb->dst, mtu);
352 352
353 df |= (old_iph->frag_off&__constant_htons(IP_DF)); 353 df |= (old_iph->frag_off & htons(IP_DF));
354 354
355 if ((old_iph->frag_off&__constant_htons(IP_DF)) 355 if ((old_iph->frag_off & htons(IP_DF))
356 && mtu < ntohs(old_iph->tot_len)) { 356 && mtu < ntohs(old_iph->tot_len)) {
357 icmp_send(skb, ICMP_DEST_UNREACH,ICMP_FRAG_NEEDED, htonl(mtu)); 357 icmp_send(skb, ICMP_DEST_UNREACH,ICMP_FRAG_NEEDED, htonl(mtu));
358 ip_rt_put(rt); 358 ip_rt_put(rt);
@@ -445,7 +445,7 @@ ip_vs_dr_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
445 445
446 /* MTU checking */ 446 /* MTU checking */
447 mtu = dst_mtu(&rt->u.dst); 447 mtu = dst_mtu(&rt->u.dst);
448 if ((iph->frag_off&__constant_htons(IP_DF)) && skb->len > mtu) { 448 if ((iph->frag_off & htons(IP_DF)) && skb->len > mtu) {
449 icmp_send(skb, ICMP_DEST_UNREACH,ICMP_FRAG_NEEDED, htonl(mtu)); 449 icmp_send(skb, ICMP_DEST_UNREACH,ICMP_FRAG_NEEDED, htonl(mtu));
450 ip_rt_put(rt); 450 ip_rt_put(rt);
451 IP_VS_DBG_RL("ip_vs_dr_xmit(): frag needed\n"); 451 IP_VS_DBG_RL("ip_vs_dr_xmit(): frag needed\n");
@@ -519,7 +519,7 @@ ip_vs_icmp_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
519 519
520 /* MTU checking */ 520 /* MTU checking */
521 mtu = dst_mtu(&rt->u.dst); 521 mtu = dst_mtu(&rt->u.dst);
522 if ((skb->len > mtu) && (skb->nh.iph->frag_off&__constant_htons(IP_DF))) { 522 if ((skb->len > mtu) && (skb->nh.iph->frag_off & htons(IP_DF))) {
523 ip_rt_put(rt); 523 ip_rt_put(rt);
524 icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, htonl(mtu)); 524 icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, htonl(mtu));
525 IP_VS_DBG_RL("ip_vs_in_icmp(): frag needed\n"); 525 IP_VS_DBG_RL("ip_vs_in_icmp(): frag needed\n");