1. 11 May, 2019 1 commit
  2. 04 Apr, 2019 1 commit
  3. 19 Mar, 2019 1 commit
  4. 01 Mar, 2019 3 commits
  5. 07 Feb, 2019 1 commit
    • Rodolfo Alonso Hernandez's avatar
      Stop NetNS server gracefully · 44201856
      Rodolfo Alonso Hernandez authored
      This patch changes the way of stopping the NetNS server, by sending
      a SIGTERM signal and waiting for the server loop to finish. When the
      signal is received, the loop control flag is inverted. Once the loop
      is finished, the server process ends.
      
      This patch also modifies the Transport class receiver function loops.
      When the Transport object is closed, the receiver loops are stopped but
      not the file descriptors. Those file descriptors, created in the NetNS
      parent class, are closed at the end of the NetNS.close function, once
      the child process (Server) is finished and the Transport receiver loops
      are stopped. At this point, the file descriptors are not in use and can
      be closed.
      
      closes #578
      44201856
  6. 30 Aug, 2018 1 commit
    • hetmankp's avatar
      Don't assume libc version · d1869284
      hetmankp authored
      While glibc is currently at version 6, there are other libc projects in
      use which implement an older interface version, such as uClibc. Instead
      of explicitly specifying the libc name, search for any libc that is
      available.
      d1869284
  7. 30 Jul, 2018 1 commit
  8. 29 Jun, 2018 1 commit
  9. 02 Jun, 2018 1 commit
  10. 29 May, 2018 2 commits
    • Peter V. Saveliev's avatar
      remote: simplify the architecture · e15f60af
      Peter V. Saveliev authored
      1. Deprecate netlink over TCP
      2. The remote netlink server works via 2 files (pipes)
      3. Affected: NetNS
      
      From now on it is possible to communicate with the remote
      netlink via 2 file channels, like stdin/stdout.
      
      Files must support the basic file API — read/write/close/flush.
      
      The `Server()` routine takes 2 files wrapped in the `Transport`
      protocol (see NetNS implementation).
      e15f60af
    • Peter V. Saveliev's avatar
      remote: simplify the architecture · a1335c45
      Peter V. Saveliev authored
      1. Deprecate netlink over TCP
      2. The remote netlink server works via 2 files (pipes)
      3. Affected: NetNS
      
      From now on it is possible to communicate with the remote
      netlink via 2 file channels, like stdin/stdout.
      
      Files must support the basic file API — read/write/close/flush.
      
      The `Server()` routine takes 2 files wrapped in the `Transport`
      protocol (see NetNS implementation).
      a1335c45
  11. 21 May, 2018 1 commit
    • Zhengsheng Zhou's avatar
      netns: fix NetNS resource leakage (#504) · e448c5bb
      Zhengsheng Zhou authored
      This patch catches the exception during the NetNS object instantiation,
      and explicitly releases the related FDs.
      
      Once the child process has been forked, the parent process and the
      child process should close the unused ends of the socket pairs, so
      after the parent process closes "cmdch", the "select.select" invocation
      in child process returns. The child process can exit automatically
      when the parment process exits or is killed.
      
      To prevent memory leakage, this patch also removes the registered
      atexit cleanup function when NetNS is closed successfully.
      
      This patch also removes the workaround for
      https://bugs.python.org/issue27151 . This is because though the NetNS
      object was closed, but previously it cannot be garbage collected since
      there was still a reference from "atexit registry --> NetNS.close -->
      NetNS". So the NetNS's self.server(a Process object) along with its
      sentinel FD cannot be garbage collected. After this patch, everything
      can be garbage collected by GC. In Python 3.5, every Process object is
      registered to a global finalizing list using weakref. When gc about to
      delete the object, it invokes the finalizer callback and the FD is
      closed actually.
      
      Overall, there are 3 cases:
      
      1. Instantiate NetNS with non-existing netns and flags=0.
          try:
              ns = NetNS('xyz', flags=0)
          except Exception:
              pass
      Without this patch, socket pairs and memory are leaked.
      
      2. Instantiate NetNS with existing netns, then close NetNS.
          with NetNS('xyz') as ns:
              pass
      Without this patch, memory is leaked. Each time NetNS instatiates,
      "atexit._exithandlers" list gets longer.
      
      3. Instantiate NetNS, when using it, kill the parent process.
          ns = NetNS('xyz')
          time.sleep(100)
          # then kill the Python interpreter using SIGKILL
      Without the patch, the child process will not exit.
      
      Bug-Url: https://github.com/svinota/pyroute2/issues/501Signed-off-by: default avatarZhengsheng Zhou <zhengshengz@vmware.com>
      e448c5bb
  12. 15 May, 2018 1 commit
  13. 08 Apr, 2018 1 commit
  14. 17 Mar, 2018 1 commit
  15. 12 Feb, 2018 1 commit
  16. 28 Jul, 2017 1 commit
  17. 15 Jul, 2017 1 commit
    • Peter V. Saveliev's avatar
      netns: make `netns.create()` non-destructive · 81db2c98
      Peter V. Saveliev authored
      `libc.unshare(CLONE_NEWNET)` made the `netns.create()` call
      destructive — after the call the process found itself in a
      "clear" network namespace.
      
      The patch moves the whole routine in a child process, thus
      making the `netns.create()` call non-destructive.
      81db2c98
  18. 07 Jul, 2017 1 commit
  19. 04 Jul, 2017 1 commit
  20. 15 Feb, 2017 2 commits
  21. 09 Dec, 2016 1 commit
  22. 23 Sep, 2016 3 commits
  23. 29 May, 2016 1 commit
  24. 24 May, 2016 1 commit
  25. 21 May, 2016 1 commit
  26. 11 May, 2016 1 commit
  27. 28 Apr, 2016 1 commit
  28. 27 Mar, 2016 1 commit
  29. 09 Feb, 2016 1 commit
  30. 09 Dec, 2015 1 commit
  31. 08 Dec, 2015 1 commit
  32. 07 Dec, 2015 1 commit
  33. 16 Nov, 2015 1 commit
  34. 15 Nov, 2015 1 commit