Skip to content

Commit

Permalink
add ipv6 support to gateway connectivity monitor
Browse files Browse the repository at this point in the history
Summary:
Add support for ipv6 to gateway connectivity monitor
so that we can monitor uplink in a v6 only environment

Reviewed By: nedabz

Differential Revision: D15778928

fbshipit-source-id: 14ef494031d22c6eeff2f0b2013cd8e0ad99e7e5
  • Loading branch information
ammubhave authored and facebook-github-bot committed Jun 14, 2019
1 parent f0aeb47 commit 87c2f5c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion openr/fbmeshd/gateway-connectivity-monitor/Socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ Socket::connect(
return {false, "socket object in use"};
}

if ((fd = ::socket(AF_INET, SOCK_STREAM, 0)) == -1) {
if ((fd = ::socket(
address.getIPAddress().isV4() ? AF_INET : AF_INET6,
SOCK_STREAM,
0)) == -1) {
return {false, "socket"};
}

Expand Down

0 comments on commit 87c2f5c

Please sign in to comment.