|
@@ -371,7 +371,7 @@ static void ipgre_err(struct sk_buff *skb, u32 info)
|
|
by themself???
|
|
by themself???
|
|
*/
|
|
*/
|
|
|
|
|
|
- struct iphdr *iph = (struct iphdr*)skb->data;
|
|
|
|
|
|
+ struct iphdr *iph = (struct iphdr *)skb->data;
|
|
__be16 *p = (__be16*)(skb->data+(iph->ihl<<2));
|
|
__be16 *p = (__be16*)(skb->data+(iph->ihl<<2));
|
|
int grehlen = (iph->ihl<<2) + 4;
|
|
int grehlen = (iph->ihl<<2) + 4;
|
|
const int type = icmp_hdr(skb)->type;
|
|
const int type = icmp_hdr(skb)->type;
|
|
@@ -632,7 +632,7 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
|
|
|
|
|
|
if (dev->header_ops && dev->type == ARPHRD_IPGRE) {
|
|
if (dev->header_ops && dev->type == ARPHRD_IPGRE) {
|
|
gre_hlen = 0;
|
|
gre_hlen = 0;
|
|
- tiph = (struct iphdr*)skb->data;
|
|
|
|
|
|
+ tiph = (struct iphdr *)skb->data;
|
|
} else {
|
|
} else {
|
|
gre_hlen = tunnel->hlen;
|
|
gre_hlen = tunnel->hlen;
|
|
tiph = &tunnel->parms.iph;
|
|
tiph = &tunnel->parms.iph;
|
|
@@ -660,7 +660,7 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
|
|
if (neigh == NULL)
|
|
if (neigh == NULL)
|
|
goto tx_error;
|
|
goto tx_error;
|
|
|
|
|
|
- addr6 = (struct in6_addr*)&neigh->primary_key;
|
|
|
|
|
|
+ addr6 = (struct in6_addr *)&neigh->primary_key;
|
|
addr_type = ipv6_addr_type(addr6);
|
|
addr_type = ipv6_addr_type(addr6);
|
|
|
|
|
|
if (addr_type == IPV6_ADDR_ANY) {
|
|
if (addr_type == IPV6_ADDR_ANY) {
|
|
@@ -726,7 +726,7 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
|
|
}
|
|
}
|
|
#ifdef CONFIG_IPV6
|
|
#ifdef CONFIG_IPV6
|
|
else if (skb->protocol == htons(ETH_P_IPV6)) {
|
|
else if (skb->protocol == htons(ETH_P_IPV6)) {
|
|
- struct rt6_info *rt6 = (struct rt6_info*)skb->dst;
|
|
|
|
|
|
+ struct rt6_info *rt6 = (struct rt6_info *)skb->dst;
|
|
|
|
|
|
if (rt6 && mtu < dst_mtu(skb->dst) && mtu >= IPV6_MIN_MTU) {
|
|
if (rt6 && mtu < dst_mtu(skb->dst) && mtu >= IPV6_MIN_MTU) {
|
|
if ((tunnel->parms.iph.daddr &&
|
|
if ((tunnel->parms.iph.daddr &&
|
|
@@ -800,7 +800,7 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
|
|
iph->ttl = old_iph->ttl;
|
|
iph->ttl = old_iph->ttl;
|
|
#ifdef CONFIG_IPV6
|
|
#ifdef CONFIG_IPV6
|
|
else if (skb->protocol == htons(ETH_P_IPV6))
|
|
else if (skb->protocol == htons(ETH_P_IPV6))
|
|
- iph->ttl = ((struct ipv6hdr*)old_iph)->hop_limit;
|
|
|
|
|
|
+ iph->ttl = ((struct ipv6hdr *)old_iph)->hop_limit;
|
|
#endif
|
|
#endif
|
|
else
|
|
else
|
|
iph->ttl = dst_metric(&rt->u.dst, RTAX_HOPLIMIT);
|
|
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)
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- unsigned nflags=0;
|
|
|
|
|
|
+ unsigned nflags = 0;
|
|
|
|
|
|
t = netdev_priv(dev);
|
|
t = netdev_priv(dev);
|
|
|
|
|
|
@@ -1104,7 +1104,7 @@ static int ipgre_header(struct sk_buff *skb, struct net_device *dev,
|
|
|
|
|
|
static int ipgre_header_parse(const struct sk_buff *skb, unsigned char *haddr)
|
|
static int ipgre_header_parse(const struct sk_buff *skb, unsigned char *haddr)
|
|
{
|
|
{
|
|
- struct iphdr *iph = (struct iphdr*) skb_mac_header(skb);
|
|
|
|
|
|
+ struct iphdr *iph = (struct iphdr *) skb_mac_header(skb);
|
|
memcpy(haddr, &iph->saddr, 4);
|
|
memcpy(haddr, &iph->saddr, 4);
|
|
return 4;
|
|
return 4;
|
|
}
|
|
}
|