|
@@ -893,7 +893,7 @@ static int ipgre_tunnel_init(struct net_device *dev)
|
|
netif_keep_dst(dev);
|
|
netif_keep_dst(dev);
|
|
dev->addr_len = 4;
|
|
dev->addr_len = 4;
|
|
|
|
|
|
- if (iph->daddr) {
|
|
|
|
|
|
+ if (iph->daddr && !tunnel->collect_md) {
|
|
#ifdef CONFIG_NET_IPGRE_BROADCAST
|
|
#ifdef CONFIG_NET_IPGRE_BROADCAST
|
|
if (ipv4_is_multicast(iph->daddr)) {
|
|
if (ipv4_is_multicast(iph->daddr)) {
|
|
if (!iph->saddr)
|
|
if (!iph->saddr)
|
|
@@ -902,8 +902,9 @@ static int ipgre_tunnel_init(struct net_device *dev)
|
|
dev->header_ops = &ipgre_header_ops;
|
|
dev->header_ops = &ipgre_header_ops;
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|
|
- } else
|
|
|
|
|
|
+ } else if (!tunnel->collect_md) {
|
|
dev->header_ops = &ipgre_header_ops;
|
|
dev->header_ops = &ipgre_header_ops;
|
|
|
|
+ }
|
|
|
|
|
|
return ip_tunnel_init(dev);
|
|
return ip_tunnel_init(dev);
|
|
}
|
|
}
|