aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_gre.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/ip_gre.c')
-rw-r--r--net/ipv4/ip_gre.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 476cb6084c75..f12c0d6623a0 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Linux NET3: GRE over IP protocol decoder. 2 * Linux NET3: GRE over IP protocol decoder.
3 * 3 *
4 * Authors: Alexey Kuznetsov (kuznet@ms2.inr.ac.ru) 4 * Authors: Alexey Kuznetsov (kuznet@ms2.inr.ac.ru)
5 * 5 *
@@ -63,7 +63,7 @@
63 solution, but it supposes maintaing new variable in ALL 63 solution, but it supposes maintaing new variable in ALL
64 skb, even if no tunneling is used. 64 skb, even if no tunneling is used.
65 65
66 Current solution: t->recursion lock breaks dead loops. It looks 66 Current solution: t->recursion lock breaks dead loops. It looks
67 like dev->tbusy flag, but I preferred new variable, because 67 like dev->tbusy flag, but I preferred new variable, because
68 the semantics is different. One day, when hard_start_xmit 68 the semantics is different. One day, when hard_start_xmit
69 will be multithreaded we will have to use skb->encapsulation. 69 will be multithreaded we will have to use skb->encapsulation.
@@ -613,7 +613,7 @@ static int ipgre_rcv(struct sk_buff *skb)
613 if (flags == 0 && 613 if (flags == 0 &&
614 skb->protocol == htons(ETH_P_WCCP)) { 614 skb->protocol == htons(ETH_P_WCCP)) {
615 skb->protocol = htons(ETH_P_IP); 615 skb->protocol = htons(ETH_P_IP);
616 if ((*(h + offset) & 0xF0) != 0x40) 616 if ((*(h + offset) & 0xF0) != 0x40)
617 offset += 4; 617 offset += 4;
618 } 618 }
619 619
@@ -816,7 +816,7 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
816 struct sk_buff *new_skb = skb_realloc_headroom(skb, max_headroom); 816 struct sk_buff *new_skb = skb_realloc_headroom(skb, max_headroom);
817 if (!new_skb) { 817 if (!new_skb) {
818 ip_rt_put(rt); 818 ip_rt_put(rt);
819 stats->tx_dropped++; 819 stats->tx_dropped++;
820 dev_kfree_skb(skb); 820 dev_kfree_skb(skb);
821 tunnel->recursion--; 821 tunnel->recursion--;
822 return 0; 822 return 0;
@@ -1008,7 +1008,8 @@ ipgre_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
1008 goto done; 1008 goto done;
1009 dev = t->dev; 1009 dev = t->dev;
1010 } 1010 }
1011 err = unregister_netdevice(dev); 1011 unregister_netdevice(dev);
1012 err = 0;
1012 break; 1013 break;
1013 1014
1014 default: 1015 default:
@@ -1043,7 +1044,7 @@ static int ipgre_tunnel_change_mtu(struct net_device *dev, int new_mtu)
1043 so that I had to set ARPHRD_IPGRE to a random value. 1044 so that I had to set ARPHRD_IPGRE to a random value.
1044 I have an impression, that Cisco could make something similar, 1045 I have an impression, that Cisco could make something similar,
1045 but this feature is apparently missing in IOS<=11.2(8). 1046 but this feature is apparently missing in IOS<=11.2(8).
1046 1047
1047 I set up 10.66.66/24 and fec0:6666:6666::0/96 as virtual networks 1048 I set up 10.66.66/24 and fec0:6666:6666::0/96 as virtual networks
1048 with broadcast 224.66.66.66. If you have access to mbone, play with me :-) 1049 with broadcast 224.66.66.66. If you have access to mbone, play with me :-)
1049 1050
@@ -1075,9 +1076,9 @@ static int ipgre_header(struct sk_buff *skb, struct net_device *dev, unsigned sh
1075 p[1] = htons(type); 1076 p[1] = htons(type);
1076 1077
1077 /* 1078 /*
1078 * Set the source hardware address. 1079 * Set the source hardware address.
1079 */ 1080 */
1080 1081
1081 if (saddr) 1082 if (saddr)
1082 memcpy(&iph->saddr, saddr, 4); 1083 memcpy(&iph->saddr, saddr, 4);
1083 1084
@@ -1087,7 +1088,7 @@ static int ipgre_header(struct sk_buff *skb, struct net_device *dev, unsigned sh
1087 } 1088 }
1088 if (iph->daddr && !MULTICAST(iph->daddr)) 1089 if (iph->daddr && !MULTICAST(iph->daddr))
1089 return t->hlen; 1090 return t->hlen;
1090 1091
1091 return -t->hlen; 1092 return -t->hlen;
1092} 1093}
1093 1094