Skip to content

Commit

Permalink
Fix socket bind for IPV6
Browse files Browse the repository at this point in the history
  • Loading branch information
madhurajayaraman committed Oct 28, 2024
1 parent 046c127 commit 5b8bda5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion starboard/shared/starboard/link_receiver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ int CreateLocallyBoundSocket(SbSocketAddressType address_type, int port) {
// See https://www.ietf.org/rfc/rfc3493.txt for details.
if (local_address && (local_address->type == kSbSocketAddressTypeIpv6) &&
common::MemoryIsZero(local_address->address, 16)) {
int on = 1;
int on = 0;
if (setsockopt(socket_fd, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(on)) !=
0) {
// Silently ignore errors, assume the default behavior is as expected.
Expand Down

0 comments on commit 5b8bda5

Please sign in to comment.