1. 24 Nov, 2015 1 commit
    • Mike Frysinger's avatar
      use sockaddr_storage everywhere · 5c9e1e76
      Mike Frysinger authored
      Not all sockaddr structs have the same alignment.  Instead, it depends
      on the fields contained in it.  The way net-tools has written things
      though, it accepts sockaddr* everywhere which has 16bit alignment, even
      though it will cast it to other sockaddr types that have higher alignment.
      For example, `route` can crash on alpha because it declares sockaddr on
      the stack, but then casts it up to sockaddr_in6 (which has 32bits).
      It's also bad storage wise as we might try to cast the sockaddr to a type
      that is larger than sockaddr which means clobbering the stack.
      Instead, lets rewrite all the APIs to take a sockaddr_storage.  This is
      guaranteed to have both the maximum alignment and size requirements for
      all other sockaddr types.  Now we can safely cast that pointer to any
      other sockaddr type and not worry about it.  It also has the nice effect
      of deleting a lot of casts in a lot of places when we only need the type
      of family.
      The vast majority of changes here are mechanical.  There are a few places
      where we have to memcpy between a dedicated sockaddr_storage and a smaller
      struct because we're using an external embedded type (like arpreq).
      URL: https://bugs.gentoo.org/558436
  2. 05 Sep, 2015 1 commit
  3. 21 Nov, 2011 3 commits
  4. 05 Mar, 2000 1 commit
  5. 19 Nov, 1998 1 commit
  6. 17 Nov, 1998 1 commit
  7. 15 Nov, 1998 1 commit
    • Klaas Freitag's avatar
      Yow. This is net-tools completely reindented. · 49d6a000
      Klaas Freitag authored
      Some other cleanups:
      - lib/net-string.c removed because it was not used and had a copyright notice
      that conflicted with the GPL.
      - Minor cleanups.
      - Fix an potential buffer overflow in ax25.
      - Switch to CVS $Id$ for versioning consistently
  8. 10 Aug, 1998 1 commit
  9. 08 Jan, 1998 1 commit