diff options
author | Jianjun Kong <jianjun@zeuux.org> | 2008-11-03 03:25:16 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-03 03:25:16 -0500 |
commit | 6ed2533e55889943c478d11b1f63aaed2fd767cc (patch) | |
tree | a51dab03a1c92cc229841fb8c758c481c5ac5f3e /net/ipv4/ip_gre.c | |
parent | 5a5f3a8db9d70c90e9d55b46e02b2d8deb1c2c2e (diff) |
net: clean up net/ipv4/fib_frontend.c fib_hash.c ip_gre.c
Signed-off-by: Jianjun Kong <jianjun@zeuux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_gre.c')
-rw-r--r-- | net/ipv4/ip_gre.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index 85c487b8572b..191ef7588134 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c | |||
@@ -371,7 +371,7 @@ static void ipgre_err(struct sk_buff *skb, u32 info) | |||
371 | by themself??? | 371 | by themself??? |
372 | */ | 372 | */ |
373 | 373 | ||
374 | struct iphdr *iph = (struct iphdr*)skb->data; | 374 | struct iphdr *iph = (struct iphdr *)skb->data; |
375 | __be16 *p = (__be16*)(skb->data+(iph->ihl<<2)); | 375 | __be16 *p = (__be16*)(skb->data+(iph->ihl<<2)); |
376 | int grehlen = (iph->ihl<<2) + 4; | 376 | int grehlen = (iph->ihl<<2) + 4; |
377 | const int type = icmp_hdr(skb)->type; | 377 | const int type = icmp_hdr(skb)->type; |
@@ -632,7 +632,7 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | |||
632 | 632 | ||
633 | if (dev->header_ops && dev->type == ARPHRD_IPGRE) { | 633 | if (dev->header_ops && dev->type == ARPHRD_IPGRE) { |
634 | gre_hlen = 0; | 634 | gre_hlen = 0; |
635 | tiph = (struct iphdr*)skb->data; | 635 | tiph = (struct iphdr *)skb->data; |
636 | } else { | 636 | } else { |
637 | gre_hlen = tunnel->hlen; | 637 | gre_hlen = tunnel->hlen; |
638 | tiph = &tunnel->parms.iph; | 638 | tiph = &tunnel->parms.iph; |
@@ -660,7 +660,7 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | |||
660 | if (neigh == NULL) | 660 | if (neigh == NULL) |
661 | goto tx_error; | 661 | goto tx_error; |
662 | 662 | ||
663 | addr6 = (struct in6_addr*)&neigh->primary_key; | 663 | addr6 = (struct in6_addr *)&neigh->primary_key; |
664 | addr_type = ipv6_addr_type(addr6); | 664 | addr_type = ipv6_addr_type(addr6); |
665 | 665 | ||
666 | if (addr_type == IPV6_ADDR_ANY) { | 666 | if (addr_type == IPV6_ADDR_ANY) { |
@@ -726,7 +726,7 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | |||
726 | } | 726 | } |
727 | #ifdef CONFIG_IPV6 | 727 | #ifdef CONFIG_IPV6 |
728 | else if (skb->protocol == htons(ETH_P_IPV6)) { | 728 | else if (skb->protocol == htons(ETH_P_IPV6)) { |
729 | struct rt6_info *rt6 = (struct rt6_info*)skb->dst; | 729 | struct rt6_info *rt6 = (struct rt6_info *)skb->dst; |
730 | 730 | ||
731 | if (rt6 && mtu < dst_mtu(skb->dst) && mtu >= IPV6_MIN_MTU) { | 731 | if (rt6 && mtu < dst_mtu(skb->dst) && mtu >= IPV6_MIN_MTU) { |
732 | if ((tunnel->parms.iph.daddr && | 732 | if ((tunnel->parms.iph.daddr && |
@@ -800,7 +800,7 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | |||
800 | iph->ttl = old_iph->ttl; | 800 | iph->ttl = old_iph->ttl; |
801 | #ifdef CONFIG_IPV6 | 801 | #ifdef CONFIG_IPV6 |
802 | else if (skb->protocol == htons(ETH_P_IPV6)) | 802 | else if (skb->protocol == htons(ETH_P_IPV6)) |
803 | iph->ttl = ((struct ipv6hdr*)old_iph)->hop_limit; | 803 | iph->ttl = ((struct ipv6hdr *)old_iph)->hop_limit; |
804 | #endif | 804 | #endif |
805 | else | 805 | else |
806 | iph->ttl = dst_metric(&rt->u.dst, RTAX_HOPLIMIT); | 806 | iph->ttl = dst_metric(&rt->u.dst, RTAX_HOPLIMIT); |
@@ -962,7 +962,7 @@ ipgre_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) | |||
962 | break; | 962 | break; |
963 | } | 963 | } |
964 | } else { | 964 | } else { |
965 | unsigned nflags=0; | 965 | unsigned nflags = 0; |
966 | 966 | ||
967 | t = netdev_priv(dev); | 967 | t = netdev_priv(dev); |
968 | 968 | ||
@@ -1104,7 +1104,7 @@ static int ipgre_header(struct sk_buff *skb, struct net_device *dev, | |||
1104 | 1104 | ||
1105 | static int ipgre_header_parse(const struct sk_buff *skb, unsigned char *haddr) | 1105 | static int ipgre_header_parse(const struct sk_buff *skb, unsigned char *haddr) |
1106 | { | 1106 | { |
1107 | struct iphdr *iph = (struct iphdr*) skb_mac_header(skb); | 1107 | struct iphdr *iph = (struct iphdr *) skb_mac_header(skb); |
1108 | memcpy(haddr, &iph->saddr, 4); | 1108 | memcpy(haddr, &iph->saddr, 4); |
1109 | return 4; | 1109 | return 4; |
1110 | } | 1110 | } |