1. 21 2月, 2018 1 次提交
  2. 20 2月, 2018 11 次提交
  3. 17 2月, 2018 11 次提交
  4. 16 2月, 2018 2 次提交
    • D
      net/ipv4: Remove fib table id from rtable · 68e813aa
      David Ahern 提交于
      Remove rt_table_id from rtable. It was added for getroute to return the
      table id that was hit in the lookup. With the changes for fibmatch the
      table id can be extracted from the fib_info returned in the fib_result
      so it no longer needs to be in rtable directly.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      68e813aa
    • K
      tun: Add ioctl() SIOCGSKNS cmd to allow obtaining net ns of tun device · f2780d6d
      Kirill Tkhai 提交于
      This patch adds possibility to get tun device's net namespace fd
      in the same way we allow to do that for sockets.
      
      Socket ioctl numbers do not intersect with tun-specific, and there
      is already SIOCSIFHWADDR used in tun code. So, SIOCGSKNS number
      is choosen instead of custom-made for this functionality.
      
      Note, that open_related_ns() uses plain get_net_ns() and it's safe
      (net can't be already dead at this moment):
      
        tun socket is allocated via sk_alloc() with zero last arg (kern = 0).
        So, each alive socket increments net::count, and the socket is definitely
        alive during ioctl syscall.
      
      Also, common variable net is introduced, so small cleanup in TUNSETIFF
      is made.
      Signed-off-by: NKirill Tkhai <ktkhai@virtuozzo.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f2780d6d
  5. 15 2月, 2018 15 次提交