mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-15 07:04:44 +00:00
ipv6: Set features for IPv6 tunnels
Need to set dev features, use same values that are used in GREv6. Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b3a27b519b
commit
51c052d4f5
1 changed files with 9 additions and 0 deletions
|
@ -1640,6 +1640,11 @@ static const struct net_device_ops ip6_tnl_netdev_ops = {
|
||||||
.ndo_get_iflink = ip6_tnl_get_iflink,
|
.ndo_get_iflink = ip6_tnl_get_iflink,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define IPXIPX_FEATURES (NETIF_F_SG | \
|
||||||
|
NETIF_F_FRAGLIST | \
|
||||||
|
NETIF_F_HIGHDMA | \
|
||||||
|
NETIF_F_GSO_SOFTWARE | \
|
||||||
|
NETIF_F_HW_CSUM)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ip6_tnl_dev_setup - setup virtual tunnel device
|
* ip6_tnl_dev_setup - setup virtual tunnel device
|
||||||
|
@ -1659,6 +1664,10 @@ static void ip6_tnl_dev_setup(struct net_device *dev)
|
||||||
dev->addr_len = sizeof(struct in6_addr);
|
dev->addr_len = sizeof(struct in6_addr);
|
||||||
dev->features |= NETIF_F_LLTX;
|
dev->features |= NETIF_F_LLTX;
|
||||||
netif_keep_dst(dev);
|
netif_keep_dst(dev);
|
||||||
|
|
||||||
|
dev->features |= IPXIPX_FEATURES;
|
||||||
|
dev->hw_features |= IPXIPX_FEATURES;
|
||||||
|
|
||||||
/* This perm addr will be used as interface identifier by IPv6 */
|
/* This perm addr will be used as interface identifier by IPv6 */
|
||||||
dev->addr_assign_type = NET_ADDR_RANDOM;
|
dev->addr_assign_type = NET_ADDR_RANDOM;
|
||||||
eth_random_addr(dev->perm_addr);
|
eth_random_addr(dev->perm_addr);
|
||||||
|
|
Loading…
Reference in a new issue