Skip to content

Commit 0071d15

Browse files
q2vendavem330
authored andcommitted
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: 13715ac ("selftest: Add test for bind() conflicts.") Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent c48ef9c commit 0071d15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/testing/selftests/net/bind_wildcard.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ void bind_sockets(struct __test_metadata *_metadata,
100100
TEST_F(bind_wildcard, v4_v6)
101101
{
102102
bind_sockets(_metadata, self,
103-
(struct sockaddr *)&self->addr4, sizeof(self->addr6),
103+
(struct sockaddr *)&self->addr4, sizeof(self->addr4),
104104
(struct sockaddr *)&self->addr6, sizeof(self->addr6));
105105
}
106106

0 commit comments

Comments
 (0)