Fix getifaddrs (XCC)
authorBarret Rhoden <brho@cs.berkeley.edu>
Thu, 4 May 2017 18:44:58 +0000 (14:44 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Thu, 4 May 2017 18:45:16 +0000 (14:45 -0400)
commit60150a3be32eb5a88bb2b3941cbad4b1d72db05e
treed9f48e085b67f8212078a5cb845981199ae8d63c
parentb0dcdf129c2b50bfc64779ac5d14dca8d12b1f0f
Fix getifaddrs (XCC)

There were a bunch of problems.  First, there was a buffer overflow with
the etheraddr, which was being used for the pathname.  That always went
over.  Second, the for loop for freeing the ifaddrs was wrong, since it'd
access ifa->ifa_next after ifa was freed.

Next up, it wasn't reporting the ethernet address in a way that anyone knew
to look for, and it didn't support IP addresses.

All of that should work now, though I didn't test IPv6.

Rebuild glibc.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
tests/getifaddrs.c
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/Makefile
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/ifaddrs.c [deleted file]
user/iplib/ifaddrs.c [new file with mode: 0644]