Skip to content

Commit

Permalink
Merge pull request managarm#1091 from no92/bind-interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennisbonke authored Jul 9, 2024
2 parents 3fc8753 + b481ffe commit 8355866
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sysdeps/managarm/generic/socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,10 @@ std::array<std::pair<int, int>, 5> setsockopt_readonly = {{
{ SOL_SOCKET, SO_TYPE },
}};

std::array<std::pair<int, int>, 3> setsockopt_passthrough = {{
std::array<std::pair<int, int>, 4> setsockopt_passthrough = {{
{ SOL_PACKET, PACKET_AUXDATA },
{ SOL_SOCKET, SO_LOCK_FILTER },
{ SOL_SOCKET, SO_BINDTODEVICE },
{ SOL_IP, IP_PKTINFO },
}};

Expand Down Expand Up @@ -407,6 +408,8 @@ int sys_setsockopt(int fd, int layer, int number,
return 0;
else if(resp.error() == managarm::fs::Errors::ILLEGAL_OPERATION_TARGET)
return EINVAL;
else if(resp.error() == managarm::fs::Errors::ILLEGAL_ARGUMENT)
return EINVAL;
else if(resp.error() == managarm::fs::Errors::INVALID_PROTOCOL_OPTION)
return ENOPROTOOPT;
else
Expand Down

0 comments on commit 8355866

Please sign in to comment.