1. 02 4月, 2012 1 次提交
  2. 28 3月, 2012 1 次提交
  3. 23 3月, 2012 1 次提交
  4. 20 3月, 2012 1 次提交
  5. 17 3月, 2012 1 次提交
  6. 16 3月, 2012 1 次提交
  7. 12 3月, 2012 1 次提交
    • L
      ipv6: Fix Smatch warning. · 8b2aaede
      Li Wei 提交于
      With commit d6ddef9e(IPv6: Fix not join all-router mcast group
      when forwarding set.) I check 'dev' after it's dereference that
      leads to a Smatch complaint:
      
      net/ipv6/addrconf.c:438 ipv6_add_dev()
      	 warn: variable dereferenced before check 'dev' (see line 432)
      
      net/ipv6/addrconf.c
         431		/* protected by rtnl_lock */
         432		rcu_assign_pointer(dev->ip6_ptr, ndev);
                                         ^^^^^^^^^^^^
      Old dereference.
      
         433
         434		/* Join all-node multicast group */
         435		ipv6_dev_mc_inc(dev, &in6addr_linklocal_allnodes);
         436
         437		/* Join all-router multicast group if forwarding is set
      */
         438		if (ndev->cnf.forwarding && dev && (dev->flags &
      IFF_MULTICAST))
                                                  ^^^
      
      Remove the check to avoid the complaint as 'dev' can't be NULL.
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NLi Wei <lw@cn.fujitsu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8b2aaede
  8. 08 3月, 2012 3 次提交
  9. 07 3月, 2012 1 次提交
  10. 24 2月, 2012 1 次提交
  11. 23 2月, 2012 1 次提交
  12. 22 2月, 2012 1 次提交
  13. 13 2月, 2012 2 次提交
  14. 09 2月, 2012 1 次提交
  15. 02 2月, 2012 2 次提交
    • D
      ipv6: Remove never used function inet6_ac_check(). · f79d52c2
      David S. Miller 提交于
      It went from unused, to commented out, and never changing after
      that.
      
      Just get rid of it, if someone wants it they can unearth it from
      the history.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f79d52c2
    • S
      tcp: md5: RST: getting md5 key from listener · 658ddaaf
      Shawn Lu 提交于
      TCP RST mechanism is broken in TCP md5(RFC2385). When
      connection is gone, md5 key is lost, sending RST
      without md5 hash is deem to ignored by peer. This can
      be a problem since RST help protocal like bgp to fast
      recove from peer crash.
      
      In most case, users of tcp md5, such as bgp and ldp,
      have listener on both sides to accept connection from peer.
      md5 keys for peers are saved in listening socket.
      
      There are two cases in finding md5 key when connection is
      lost:
      1.Passive receive RST: The message is send to well known port,
      tcp will associate it with listner. md5 key is gotten from
      listener.
      
      2.Active receive RST (no sock): The message is send to ative
      side, there is no socket associated with the message. In this
      case, finding listener from source port, then find md5 key from
      listener.
      
      we are not loosing sercuriy here:
      packet is checked with md5 hash. No RST is generated
      if md5 hash doesn't match or no md5 key can be found.
      Signed-off-by: NShawn Lu <shawn.lu@ericsson.com>
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      658ddaaf
  16. 01 2月, 2012 4 次提交
  17. 31 1月, 2012 1 次提交
  18. 28 1月, 2012 4 次提交
  19. 27 1月, 2012 3 次提交
  20. 23 1月, 2012 1 次提交
  21. 19 1月, 2012 1 次提交
    • F
      net: race condition in ipv6 forwarding and disable_ipv6 parameters · 013d97e9
      Francesco Ruggeri 提交于
      There is a race condition in addrconf_sysctl_forward() and
      addrconf_sysctl_disable().
      These functions change idev->cnf.forwarding (resp. idev->cnf.disable_ipv6)
      and then try to grab the rtnl lock before performing any actions.
      If that fails they restore the original value and restart the syscall.
      This creates race conditions if ipv6 code tries to access
      these parameters, or if multiple instances try to do the same operation.
      As an example of the former, if __ipv6_ifa_notify() finds a 0 in
      idev->cnf.forwarding when invoked by addrconf_ifdown() it may not free
      anycast addresses, ultimately resulting in the net_device not being freed.
      This patch reads the user parameters into a temporary location and only
      writes the actual parameters when the rtnl lock is acquired.
      Tested in 2.6.38.8.
      Signed-off-by: NFrancesco Ruggeri <fruggeri@aristanetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      013d97e9
  22. 18 1月, 2012 1 次提交
  23. 17 1月, 2012 1 次提交
  24. 14 1月, 2012 1 次提交
  25. 13 1月, 2012 1 次提交
  26. 06 1月, 2012 1 次提交
  27. 05 1月, 2012 2 次提交
    • M
      ipv6/addrconf: speedup /proc/net/if_inet6 filling · 1d578303
      Mihai Maruseac 提交于
      This ensures a linear behaviour when filling /proc/net/if_inet6 thus making
      ifconfig run really fast on IPv6 only addresses. In fact, with this patch and
      the IPv4 one sent a while ago, ifconfig will run in linear time regardless of
      address type.
      
      IPv4 related patch: f04565dd
      	 dev: use name hash for dev_seq_ops
      	 ...
      
      Some statistics (running ifconfig > /dev/null on a different setup):
      
      iface count / IPv6 no-patch time / IPv6 patched time / IPv4 time
      ----------------------------------------------------------------
            6250  |       0.23 s       |      0.13 s       |  0.11 s
           12500  |       0.62 s       |      0.28 s       |  0.22 s
           25000  |       2.91 s       |      0.57 s       |  0.46 s
           50000  |      11.37 s       |      1.21 s       |  0.94 s
          128000  |      86.78 s       |      3.05 s       |  2.54 s
      Signed-off-by: NMihai Maruseac <mmaruseac@ixiacom.com>
      Cc: Daniel Baluta <dbaluta@ixiacom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1d578303
    • N
      ipv6: Check RA for sllao when configuring optimistic ipv6 address (v2) · e6bff995
      Neil Horman 提交于
      Recently Dave noticed that a test we did in ipv6_add_addr to see if we next hop
      route for the interface we're adding an addres to was wrong (see commit
      7ffbcecb).  for one, it never triggers, and two,
      it was completely wrong to begin with.  This test was meant to cover this
      section of RFC 4429:
      
      3.3 Modifications to RFC 2462 Stateless Address Autoconfiguration
      
         * (modifies section 5.5) A host MAY choose to configure a new address
              as an Optimistic Address.  A host that does not know the SLLAO
              of its router SHOULD NOT configure a new address as Optimistic.
              A router SHOULD NOT configure an Optimistic Address.
      
      This patch should bring us into proper compliance with the above clause.  Since
      we only add a SLAAC address after we've received a RA which may or may not
      contain a source link layer address option, we can pass a pointer to that option
      to addrconf_prefix_rcv (which may be null if the option is not present), and
      only set the optimistic flag if the option was found in the RA.
      
      Change notes:
      (v2) modified the new parameter to addrconf_prefix_rcv to be a bool rather than
      a pointer to make its use more clear as per request from davem.
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      CC: "David S. Miller" <davem@davemloft.net>
      CC: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e6bff995