tcp: fix recv with flags MSG_WAITALL | MSG_PEEK
[firefly-linux-kernel-4.4.55.git] / net / tipc / ib_media.c
index 8522eef9c136bc25d39e166b32dfc459881d77c9..e8c16718e3faea3bf4983f12f2f5fc5c289175eb 100644 (file)
@@ -57,7 +57,7 @@ static int tipc_ib_addr2str(struct tipc_media_addr *a, char *str_buf,
 /* Convert from media address format to discovery message addr format */
 static int tipc_ib_addr2msg(char *msg, struct tipc_media_addr *addr)
 {
-       memset(msg, 0, TIPC_MEDIA_ADDR_SIZE);
+       memset(msg, 0, TIPC_MEDIA_INFO_SIZE);
        memcpy(msg, addr->value, INFINIBAND_ALEN);
        return 0;
 }