diff options
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c index 19eba3c877cb..d41ea27be5e1 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c | |||
@@ -767,8 +767,11 @@ void ipoib_mcast_dev_flush(struct net_device *dev) | |||
767 | } | 767 | } |
768 | } | 768 | } |
769 | 769 | ||
770 | static int ipoib_mcast_addr_is_valid(const u8 *addr, const u8 *broadcast) | 770 | static int ipoib_mcast_addr_is_valid(const u8 *addr, unsigned int addrlen, |
771 | const u8 *broadcast) | ||
771 | { | 772 | { |
773 | if (addrlen != INFINIBAND_ALEN) | ||
774 | return 0; | ||
772 | /* reserved QPN, prefix, scope */ | 775 | /* reserved QPN, prefix, scope */ |
773 | if (memcmp(addr, broadcast, 6)) | 776 | if (memcmp(addr, broadcast, 6)) |
774 | return 0; | 777 | return 0; |
@@ -812,6 +815,7 @@ void ipoib_mcast_restart_task(struct work_struct *work) | |||
812 | union ib_gid mgid; | 815 | union ib_gid mgid; |
813 | 816 | ||
814 | if (!ipoib_mcast_addr_is_valid(mclist->dmi_addr, | 817 | if (!ipoib_mcast_addr_is_valid(mclist->dmi_addr, |
818 | mclist->dmi_addrlen, | ||
815 | dev->broadcast)) | 819 | dev->broadcast)) |
816 | continue; | 820 | continue; |
817 | 821 | ||