Add rudimentary test for getifaddrs(). Tests, for example, that we have
two loopback interfaces - one with AF_INET and one with AF_PACKET.
The test can run on both OSv and Linux.
Additionally prints out some information on the available interfaces,
which can be useful in manual testing.
Signed-of
From: Benoît Canet
Committer: Nadav Har'El
Branch: master
libc/getifaddrs: Extract and use allocate_and_add_ifaddrs
The code will need to allocate twice as much
ifaddr_storage structure to be able to return mac
addresses in their own ifaddrs structure.
Signed-off-by: Benoît Canet
Message-Id:
From: Benoît Canet
Committer: Nadav Har'El
Branch: master
libc: Move getifaddrs.c from musl to libc.
Signed-off-by: Benoît Canet
Message-Id: <1477485154-13682-2-git-send-email-ben...@scylladb.com>
---
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -1354,7 +1354,7 @@ musl +
From: Benoît Canet
Committer: Nadav Har'El
Branch: master
libc/getifaddrs: Also return ifaddrs with ether hw addresses
Before this patch, OSv's getifaddrs() returns for each network interface
a single entry, with the AF_INET address family and sockaddr_in address
type.
Linux's getifaddrs() re
From: Timmons C. Player
Committer: Nadav Har'El
Branch: master
uipc_socket.cc: prevent use after free bug in soisdisconnected
Simultaneously closing a socket from both the network and user
space sides can trigger a use after free bug in soisdisconnected.
This change uses the existing socket re
On Wed, Oct 26, 2016 at 3:27 PM, Benoît Canet
wrote:
>
>
> On Wed, Oct 26, 2016 at 2:03 PM, Nadav Har'El wrote:
>
>>
>>
>> Shouldn't we also skip non-AF_INET interfaces, like loopback?
>>
>
> 127.0.0.1 look totally like an IPV4 address so it's AF_INET.
>
Hmm, You're right. So in OSv we have no
Add these structure add the end of the list after the
INET and INET6 addresses are filled.
Signed-off-by: Benoît Canet
---
libc/network/getifaddrs.c | 71 ---
1 file changed, 67 insertions(+), 4 deletions(-)
diff --git a/libc/network/getifaddrs.c b/li
Add sockaddr_ll in the soa union to make room for hw addresses.
Benoît Canet (3):
libc: Move getifaddrs.c from musl to libc.
libc/getifaddrs: Extract and use allocate_and_add_ifaddrs
libc/getifaddrs: Also return ifaddrs with ether hw addresses
Makefile | 2 +-
libc/netwo
The code will need to allocate twice as much
ifaddr_storage structure to be able to return mac
addresses in their own ifaddrs structure.
Signed-off-by: Benoît Canet
---
libc/network/getifaddrs.c | 21 +++--
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/libc/netwo
Signed-off-by: Benoît Canet
---
Makefile | 2 +-
libc/network/getifaddrs.c | 180 ++
2 files changed, 181 insertions(+), 1 deletion(-)
create mode 100644 libc/network/getifaddrs.c
diff --git a/Makefile b/Makefile
index e294a03..03b0
On Wed, Oct 26, 2016 at 2:03 PM, Nadav Har'El wrote:
> Please add "Fixes #787" to the commit message.
>
> Thanks, the patch looks mostly correct, but one question below.
>
> On Wed, Oct 26, 2016 at 2:33 PM, Benoît Canet com> wrote:
>
>> Add these structure add the end of the list after the
>> IN
Please add "Fixes #787" to the commit message.
Thanks, the patch looks mostly correct, but one question below.
On Wed, Oct 26, 2016 at 2:33 PM, Benoît Canet <
benoit.canet.cont...@gmail.com> wrote:
> Add these structure add the end of the list after the
> INET and INET6 addresses are filled.
>
>
Signed-off-by: Benoît Canet
---
Makefile | 2 +-
libc/network/getifaddrs.c | 180 ++
2 files changed, 181 insertions(+), 1 deletion(-)
create mode 100644 libc/network/getifaddrs.c
diff --git a/Makefile b/Makefile
index e294a03..03b0
The code will need to allocate twice as much
ifaddr_storage structure to be able to return mac
addresses in their own ifaddrs structure.
Signed-off-by: Benoît Canet
---
libc/network/getifaddrs.c | 21 +++--
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/libc/netwo
Should make node.js work by returning the right
structure filled with mac addresses.
Benoît Canet (3):
libc: Move getifaddrs.c from musl to libc.
libc/getifaddrs: Extract and use allocate_and_add_ifaddrs
libc/getifaddrs: Also return ifaddrs with ether hw addresses
Makefile
Add these structure add the end of the list after the
INET and INET6 addresses are filled.
Signed-off-by: Benoît Canet
---
libc/network/getifaddrs.c | 70 ---
1 file changed, 66 insertions(+), 4 deletions(-)
diff --git a/libc/network/getifaddrs.c b/li
16 matches
Mail list logo