diff options
Diffstat (limited to 'drivers/infiniband/hw/mlx4/main.c')
-rw-r--r-- | drivers/infiniband/hw/mlx4/main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c index bf09d79afd4d..16fb2327813a 100644 --- a/drivers/infiniband/hw/mlx4/main.c +++ b/drivers/infiniband/hw/mlx4/main.c | |||
@@ -1679,6 +1679,7 @@ static void mlx4_ib_get_dev_addr(struct net_device *dev, | |||
1679 | struct inet6_dev *in6_dev; | 1679 | struct inet6_dev *in6_dev; |
1680 | union ib_gid *pgid; | 1680 | union ib_gid *pgid; |
1681 | struct inet6_ifaddr *ifp; | 1681 | struct inet6_ifaddr *ifp; |
1682 | union ib_gid default_gid; | ||
1682 | #endif | 1683 | #endif |
1683 | union ib_gid gid; | 1684 | union ib_gid gid; |
1684 | 1685 | ||
@@ -1699,12 +1700,15 @@ static void mlx4_ib_get_dev_addr(struct net_device *dev, | |||
1699 | in_dev_put(in_dev); | 1700 | in_dev_put(in_dev); |
1700 | } | 1701 | } |
1701 | #if IS_ENABLED(CONFIG_IPV6) | 1702 | #if IS_ENABLED(CONFIG_IPV6) |
1703 | mlx4_make_default_gid(dev, &default_gid); | ||
1702 | /* IPv6 gids */ | 1704 | /* IPv6 gids */ |
1703 | in6_dev = in6_dev_get(dev); | 1705 | in6_dev = in6_dev_get(dev); |
1704 | if (in6_dev) { | 1706 | if (in6_dev) { |
1705 | read_lock_bh(&in6_dev->lock); | 1707 | read_lock_bh(&in6_dev->lock); |
1706 | list_for_each_entry(ifp, &in6_dev->addr_list, if_list) { | 1708 | list_for_each_entry(ifp, &in6_dev->addr_list, if_list) { |
1707 | pgid = (union ib_gid *)&ifp->addr; | 1709 | pgid = (union ib_gid *)&ifp->addr; |
1710 | if (!memcmp(pgid, &default_gid, sizeof(*pgid))) | ||
1711 | continue; | ||
1708 | update_gid_table(ibdev, port, pgid, 0, 0); | 1712 | update_gid_table(ibdev, port, pgid, 0, 0); |
1709 | } | 1713 | } |
1710 | read_unlock_bh(&in6_dev->lock); | 1714 | read_unlock_bh(&in6_dev->lock); |