Commit 616f6643 authored by Nick Mathewson's avatar Nick Mathewson 🤹
Browse files

get_interface_addr6(), and by extension get_interface_addr(), were pretty...

get_interface_addr6(), and by extension get_interface_addr(), were pretty borked.  Copying a tor_addr_t from a sockaddr_storage using memcpy is a poor notion.

svn:r17789
parent 61722638
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
Changes in version 0.2.1.10-alpha - 2009-??-??
  o Minor bugfixes
    - Make get_interface_address() function work properly again; stop
      guessing the wrong parts of our address as our address.


Changes in version 0.2.1.9-alpha - 2008-12-25
  o New directory authorities:
    - gabelmoo (the authority run by Karsten Loesing) now has a new
+1 −1
Original line number Diff line number Diff line
@@ -1088,7 +1088,7 @@ get_interface_address6(int severity, sa_family_t family, tor_addr_t *addr)
    goto err;
  }

  memcpy(addr, &my_addr, sizeof(tor_addr_t));
  tor_addr_from_sockaddr(addr, (struct sockaddr*)&my_addr, NULL);
  r=0;
 err:
  if (sock >= 0)