aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 af5d1f38217f..d0abde4236af 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -893,7 +893,7 @@ static int ipgre_tunnel_init(struct net_device *dev)
893 netif_keep_dst(dev); 893 netif_keep_dst(dev);
894 dev->addr_len = 4; 894 dev->addr_len = 4;
895 895
896 if (iph->daddr) { 896 if (iph->daddr && !tunnel->collect_md) {
897#ifdef CONFIG_NET_IPGRE_BROADCAST 897#ifdef CONFIG_NET_IPGRE_BROADCAST
898 if (ipv4_is_multicast(iph->daddr)) { 898 if (ipv4_is_multicast(iph->daddr)) {
899 if (!iph->saddr) 899 if (!iph->saddr)
@@ -902,8 +902,9 @@ static int ipgre_tunnel_init(struct net_device *dev)
902 dev->header_ops = &ipgre_header_ops; 902 dev->header_ops = &ipgre_header_ops;
903 } 903 }
904#endif 904#endif
905 } else 905 } else if (!tunnel->collect_md) {
906 dev->header_ops = &ipgre_header_ops; 906 dev->header_ops = &ipgre_header_ops;
907 }
907 908
908 return ip_tunnel_init(dev); 909 return ip_tunnel_init(dev);
909} 910}