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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 46f9d9cf7a5f..912c42f57c79 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -28,6 +28,7 @@
28#include <linux/inetdevice.h> 28#include <linux/inetdevice.h>
29#include <linux/igmp.h> 29#include <linux/igmp.h>
30#include <linux/netfilter_ipv4.h> 30#include <linux/netfilter_ipv4.h>
31#include <linux/if_ether.h>
31 32
32#include <net/sock.h> 33#include <net/sock.h>
33#include <net/ip.h> 34#include <net/ip.h>
@@ -1140,7 +1141,7 @@ static void ipgre_tunnel_setup(struct net_device *dev)
1140 1141
1141 dev->type = ARPHRD_IPGRE; 1142 dev->type = ARPHRD_IPGRE;
1142 dev->hard_header_len = LL_MAX_HEADER + sizeof(struct iphdr) + 4; 1143 dev->hard_header_len = LL_MAX_HEADER + sizeof(struct iphdr) + 4;
1143 dev->mtu = 1500 - sizeof(struct iphdr) - 4; 1144 dev->mtu = ETH_DATA_LEN - sizeof(struct iphdr) - 4;
1144 dev->flags = IFF_NOARP; 1145 dev->flags = IFF_NOARP;
1145 dev->iflink = 0; 1146 dev->iflink = 0;
1146 dev->addr_len = 4; 1147 dev->addr_len = 4;
@@ -1152,7 +1153,7 @@ static int ipgre_tunnel_init(struct net_device *dev)
1152 struct ip_tunnel *tunnel; 1153 struct ip_tunnel *tunnel;
1153 struct iphdr *iph; 1154 struct iphdr *iph;
1154 int hlen = LL_MAX_HEADER; 1155 int hlen = LL_MAX_HEADER;
1155 int mtu = 1500; 1156 int mtu = ETH_DATA_LEN;
1156 int addend = sizeof(struct iphdr) + 4; 1157 int addend = sizeof(struct iphdr) + 4;
1157 1158
1158 tunnel = (struct ip_tunnel*)dev->priv; 1159 tunnel = (struct ip_tunnel*)dev->priv;