selftest: tcp: Fix address length in bind_wildcard.c.
The selftest passes the IPv6 address length for an IPv4 address.
We should pass the correct length.
Note inet_bind_sk() does not check if the size is larger than
sizeof(struct sockaddr_in), so there is no real bug in this
selftest.
Fixes: 13715acf8a
("selftest: Add test for bind() conflicts.")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c48ef9c4ae
commit
0071d15517
|
@ -100,7 +100,7 @@ void bind_sockets(struct __test_metadata *_metadata,
|
|||
TEST_F(bind_wildcard, v4_v6)
|
||||
{
|
||||
bind_sockets(_metadata, self,
|
||||
(struct sockaddr *)&self->addr4, sizeof(self->addr6),
|
||||
(struct sockaddr *)&self->addr4, sizeof(self->addr4),
|
||||
(struct sockaddr *)&self->addr6, sizeof(self->addr6));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue