1. 06 2月, 2013 1 次提交
  2. 05 2月, 2013 9 次提交
    • D
      ipcomp: Mark as netns_ok. · 27000929
      David S. Miller 提交于
      This module is namespace aware, netns_ok was just disabled by default
      for sanity.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      27000929
    • J
      mcast: do not check 'rv' twice in a row · 56db1c5f
      Jean Sacren 提交于
      With the loop, don't check 'rv' twice in a row. Without the loop, 'rv'
      doesn't even need to be checked.
      
      Make the comment more grammar-friendly.
      Signed-off-by: NJean Sacren <sakiwit@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      56db1c5f
    • Y
      net: remove redundant check for timer pending state before del_timer · 25cc4ae9
      Ying Xue 提交于
      As in del_timer() there has already placed a timer_pending() function
      to check whether the timer to be deleted is pending or not, it's
      unnecessary to check timer pending state again before del_timer() is
      called.
      Signed-off-by: NYing Xue <ying.xue@windriver.com>
      Cc: Eric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      25cc4ae9
    • D
      sctp: sctp_close: fix release of bindings for deferred call_rcu's · 8c98653f
      Daniel Borkmann 提交于
      It seems due to RCU usage, i.e. within SCTP's address binding list,
      a, say, ``behavioral change'' was introduced which does actually
      not conform to the RFC anymore. In particular consider the following
      (fictional) scenario to demonstrate this:
      
        do:
          Two SOCK_SEQPACKET-style sockets are opened (S1, S2)
          S1 is bound to 127.0.0.1, port 1024 [server]
          S2 is bound to 127.0.0.1, port 1025 [client]
          listen(2) is invoked on S1
          From S2 we call one sendmsg(2) with msg.msg_name and
             msg.msg_namelen parameters set to the server's
             address
          S1, S2 are closed
          goto do
      
      The first pass of this loop passes successful, while the second round
      fails during binding of S1 (address still in use). What is happening?
      In the first round, the initial handshake is being done, and, at the
      time close(2) is called on S1, a non-graceful shutdown is performed via
      ABORT since in S1's receive queue an unprocessed packet is present,
      thus stating an error condition. This can be considered as a correct
      behavior.
      
      During close also all bound addresses are freed, thus nothing *must*
      be active anymore. In reference to RFC2960:
      
        After checking the Verification Tag, the receiving endpoint shall
        remove the association from its record, and shall report the
        termination to its upper layer. (9.1 Abort of an Association)
      
      Also, no half-open states are supported, thus after an ungraceful
      shutdown, we leave nothing behind. However, this seems not to be
      happening though. In a real-world scenario, this is exactly where
      it breaks the lksctp-tools functional test suite, *for instance*:
      
        ./test_sockopt
        test_sockopt.c  1 PASS : getsockopt(SCTP_STATUS) on a socket with no assoc
        test_sockopt.c  2 PASS : getsockopt(SCTP_STATUS)
        test_sockopt.c  3 PASS : getsockopt(SCTP_STATUS) with invalid associd
        test_sockopt.c  4 PASS : getsockopt(SCTP_STATUS) with NULL associd
        test_sockopt.c  5 BROK : bind: Address already in use
      
      The underlying problem is that sctp_endpoint_destroy() hasn't been
      triggered yet while the next bind attempt is being done. It will be
      triggered eventually (but too late) by sctp_transport_destroy_rcu()
      after one RCU grace period:
      
        sctp_transport_destroy()
          sctp_transport_destroy_rcu() ----.
            sctp_association_put() [*]  <--+--> sctp_packet_free()
              sctp_association_destroy()          [...]
                sctp_endpoint_put()                 skb->destructor
                  sctp_endpoint_destroy()             sctp_wfree()
                    sctp_bind_addr_free()               sctp_association_put() [*]
      
      Thus, we move out the condition with sctp_association_put() as well as
      the sctp_packet_free() invocation and the issue can be solved. We also
      better free the SCTP chunks first before putting the ref of the association.
      
      With this patch, the example above (which simulates a similar scenario
      as in the implementation of this test case) and therefore also the test
      suite run successfully through. Tested by myself.
      
      Cc: Vlad Yasevich <vyasevich@gmail.com>
      Signed-off-by: NDaniel Borkmann <dborkman@redhat.com>
      Acked-by: NVlad Yasevich <vyasevich@gmail.com>
      Acked-by: NNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8c98653f
    • G
      netns: bridge: allow unprivileged users add/delete mdb entry · e4d343ea
      Gao feng 提交于
      since the mdb table is belong to bridge device,and the
      bridge device can only be seen in one netns.
      So it's safe to allow unprivileged user which is the
      creator of userns and netns to modify the mdb table.
      Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e4d343ea
    • G
      netns: ebtable: allow unprivileged users to operate ebtables · bb12b8b2
      Gao feng 提交于
      ebt_table is a private resource of netns, operating ebtables
      in one netns will not affect other netns, we can allow the
      creator user of userns and netns to change the ebtables.
      Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bb12b8b2
    • G
      netns: fdb: allow unprivileged users to add/del fdb entries · c5c35108
      Gao feng 提交于
      Right now,only ixgdb,macvlan,vxlan and bridge implement
      fdb_add/fdb_del operations.
      
      these operations only operate the private data of net
      device. So allowing the unprivileged users who creates
      the userns and netns to add/del fdb entries will do no
      harm to other netns.
      Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c5c35108
    • V
      tcp: ipv6: Update MIB counters for drops · 5f1e942c
      Vijay Subramanian 提交于
      This patch updates LINUX_MIB_LISTENDROPS and LINUX_MIB_LISTENOVERFLOWS in
      tcp_v6_conn_request() and tcp_v6_err(). tcp_v6_conn_request() in particular can
      drop SYNs for various reasons which are not currently tracked.
      Signed-off-by: NVijay Subramanian <subramanian.vijay@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5f1e942c
    • V
      tcp: Update MIB counters for drops · 848bf15f
      Vijay Subramanian 提交于
      This patch updates LINUX_MIB_LISTENDROPS in tcp_v4_conn_request() and
      tcp_v4_err(). tcp_v4_conn_request() in particular can drop SYNs for various
      reasons which are not currently tracked.
      Signed-off-by: NVijay Subramanian <subramanian.vijay@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      848bf15f
  3. 04 2月, 2013 4 次提交
  4. 01 2月, 2013 6 次提交
  5. 31 1月, 2013 5 次提交
  6. 30 1月, 2013 15 次提交