fuzz: use SOCK_STREAM instead of SOCK_DGRAM
Fixes oss-fuzz#10734.
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
static int test_fd[2] = { -1, -1 };
|
||||
|
||||
int lldp_network_bind_raw_socket(int ifindex) {
|
||||
if (socketpair(AF_UNIX, SOCK_DGRAM | SOCK_NONBLOCK, 0, test_fd) < 0)
|
||||
if (socketpair(AF_UNIX, SOCK_STREAM | SOCK_NONBLOCK, 0, test_fd) < 0)
|
||||
return -errno;
|
||||
|
||||
return test_fd[0];
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
static int test_fd[2];
|
||||
|
||||
int icmp6_bind_router_solicitation(int index) {
|
||||
assert_se(socketpair(AF_UNIX, SOCK_DGRAM, 0, test_fd) >= 0);
|
||||
assert_se(socketpair(AF_UNIX, SOCK_STREAM, 0, test_fd) >= 0);
|
||||
return test_fd[0];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user