Skip to content

Commit

Permalink
Merge pull request #779 from cathaysia/master
Browse files Browse the repository at this point in the history
fix(udp): fix udp create error.
  • Loading branch information
stlankes authored Jun 27, 2023
2 parents 0938e33 + 892563d commit 7461442
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fd/socket/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub(crate) extern "C" fn __sys_socket(domain: i32, type_: i32, protocol: i32) ->
);

if (domain != AF_INET && domain != AF_INET6)
|| type_ != SOCK_STREAM
|| (type_ != SOCK_STREAM && type_ != SOCK_DGRAM)
|| (protocol != 0 && protocol != IPPROTO_UDP && protocol != IPPROTO_TCP)
{
-EINVAL
Expand Down

0 comments on commit 7461442

Please sign in to comment.