google / quiche

BSD 3-Clause "New" or "Revised" License
660 stars 132 forks source link

[masque_client] Failed to enable receiving of self v4 ip on macOS #50

Open akihironagai opened 1 year ago

akihironagai commented 1 year ago

Environment: macOS 14.0 Beta (23A5337a), Xcode 15 beta 8, bazel 6.3.2

I received the following error when executing the following command:

$ ./bazel-bin/quiche/masque_client <$PROXY_HOST:$PROXY_PORT> https://quic.rocks:4433 \
> --disable_certificate_verification=true
E0911 11:22:48.963996       1 quic_udp_socket_posix.inc:219] Failed to enable receiving of self v4 ip
E0911 11:22:48.964022       1 masque_client_tools.cc:91] Failed to initialize MasqueEncapsulatedClient for https://quic.rocks:4433

However, adding --dns_on_client=true --address_family=4 at the end makes this problem free:

$ ./bazel-bin/quiche/masque_client <$PROXY_HOST:$PROXY_PORT> https://quic.rocks:4433 \
> --disable_certificate_verification=true \
> --dns_on_client=true \
> --address_family=4
$ echo "there is no error"
DavidSchinazi commented 1 year ago

That's odd. It appears to be working for me on macOS 13.6, Xcode 14.3.1, bazel 6.3.2 - would you be able to test on macOS 13 by any chance? Since this failure is caused by a call to setsockopt(fd, IPPROTO_IP, IP_PKTINFO) failing, it could be due to a change inside macOS between macOS 13 and 14.