1. 07 2月, 2009 5 次提交
  2. 06 2月, 2009 2 次提交
    • P
      netlink: change return-value logic of netlink_broadcast() · ff491a73
      Pablo Neira Ayuso 提交于
      Currently, netlink_broadcast() reports errors to the caller if no
      messages at all were delivered:
      
      1) If, at least, one message has been delivered correctly, returns 0.
      2) Otherwise, if no messages at all were delivered due to skb_clone()
         failure, return -ENOBUFS.
      3) Otherwise, if there are no listeners, return -ESRCH.
      
      With this patch, the caller knows if the delivery of any of the
      messages to the listeners have failed:
      
      1) If it fails to deliver any message (for whatever reason), return
         -ENOBUFS.
      2) Otherwise, if all messages were delivered OK, returns 0.
      3) Otherwise, if no listeners, return -ESRCH.
      
      In the current ctnetlink code and in Netfilter in general, we can add
      reliable logging and connection tracking event delivery by dropping the
      packets whose events were not successfully delivered over Netlink. Of
      course, this option would be settable via /proc as this approach reduces
      performance (in terms of filtered connections per seconds by a stateful
      firewall) but providing reliable logging and event delivery (for
      conntrackd) in return.
      
      This patch also changes some clients of netlink_broadcast() that
      may report ENOBUFS errors via printk. This error handling is not
      of any help. Instead, the userspace daemons that are listening to
      those netlink messages should resync themselves with the kernel-side
      if they hit ENOBUFS.
      
      BTW, netlink_broadcast() clients include those that call
      cn_netlink_send(), nlmsg_multicast() and genlmsg_multicast() since they
      internally call netlink_broadcast() and return its error value.
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ff491a73
    • H
      gro: Fix frag_list merging on imprecisely split packets · 56035022
      Herbert Xu 提交于
      The previous fix ad0f9904 (gro:
      Fix handling of imprecisely split packets) only fixed the case
      of frags merging, frag_list merging in the same circumstances
      were still broken.
      
      In particular, the packet headers end up in the data stream.
      
      This patch fixes this plus another issue where an imprecisely
      split packet header may be read incorrectly (this is mostly
      harmless since it'll simply cause the packet to not match and
      be rejected for GRO).
      
      Thanks to Emil Tantilov and Jeff Kirsher for helping to track
      this down.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      56035022
  3. 05 2月, 2009 2 次提交
    • H
      net: Reexport sock_alloc_send_pskb · 4cc7f68d
      Herbert Xu 提交于
      The function sock_alloc_send_pskb is completely useless if not
      exported since most of the code in it won't be used as is.  In
      fact, this code has already been duplicated in the tun driver.
      
      Now that we need accounting in the tun driver, we can in fact
      use this function as is.  So this patch marks it for export again.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4cc7f68d
    • H
      net: Partially allow skb destructors to be used on receive path · 9a279bcb
      Herbert Xu 提交于
      As it currently stands, skb destructors are forbidden on the
      receive path because the protocol end-points will overwrite
      any existing destructor with their own.
      
      This is the reason why we have to call skb_orphan in the loopback
      driver before we reinject the packet back into the stack, thus
      creating a period during which loopback traffic isn't charged
      to any socket.
      
      With virtualisation, we have a similar problem in that traffic
      is reinjected into the stack without being associated with any
      socket entity, thus providing no natural congestion push-back
      for those poor folks still stuck with UDP.
      
      Now had we been consistent in telling them that UDP simply has
      no congestion feedback, I could just fob them off.  Unfortunately,
      we appear to have gone to some length in catering for this on
      the standard UDP path, with skb/socket accounting so that has
      created a very unhealthy dependency.
      
      Alas habits are difficult to break out of, so we may just have
      to allow skb destructors on the receive path.
      
      It turns out that making skb destructors useable on the receive path
      isn't as easy as it seems.  For instance, simply adding skb_orphan
      to skb_set_owner_r isn't enough.  This is because we assume all
      over the IP stack that skb->sk is an IP socket if present.
      
      The new transparent proxy code goes one step further and assumes
      that skb->sk is the receiving socket if present.
      
      Now all of this can be dealt with by adding simple checks such
      as only treating skb->sk as an IP socket if skb->sk->sk_family
      matches.  However, it turns out that for bridging at least we
      don't need to do all of this work.
      
      This is of interest because most virtualisation setups use bridging
      so we don't actually go through the IP stack on the host (with
      the exception of our old nemesis the bridge netfilter, but that's
      easily taken care of).
      
      So this patch simply adds skb_orphan to the point just before we
      enter the IP stack, but after we've gone through the bridge on the
      receive path.  It also adds an skb_orphan to the one place in
      netfilter that touches skb->sk/skb->destructor, that is, tproxy.
      
      One word of caution, because of the internal code structure, anyone
      wishing to deploy this must use skb_set_owner_w as opposed to
      skb_set_owner_r since many functions that create a new skb from
      an existing one will invoke skb_set_owner_w on the new skb.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9a279bcb
  4. 04 2月, 2009 1 次提交
    • R
      sunrpc: fix rdma dependencies · 55128bc2
      Randy Dunlap 提交于
      Fix sunrpc/rdma build dependencies.
      Survives 12 build combinations of INET, IPV6, SUNRPC,
      INFINIBAND, and INFINIBAND_ADDR_TRANS.
      
      ERROR: "rdma_destroy_id" [net/sunrpc/xprtrdma/xprtrdma.ko] undefined!
      ERROR: "rdma_connect" [net/sunrpc/xprtrdma/xprtrdma.ko] undefined!
      ERROR: "rdma_destroy_qp" [net/sunrpc/xprtrdma/xprtrdma.ko] undefined!
      ERROR: "rdma_create_id" [net/sunrpc/xprtrdma/xprtrdma.ko] undefined!
      ERROR: "rdma_create_qp" [net/sunrpc/xprtrdma/xprtrdma.ko] undefined!
      ERROR: "rdma_resolve_route" [net/sunrpc/xprtrdma/xprtrdma.ko] undefined!
      ERROR: "rdma_disconnect" [net/sunrpc/xprtrdma/xprtrdma.ko] undefined!
      ERROR: "rdma_resolve_addr" [net/sunrpc/xprtrdma/xprtrdma.ko] undefined!
      ERROR: "rdma_accept" [net/sunrpc/xprtrdma/svcrdma.ko] undefined!
      ERROR: "rdma_destroy_id" [net/sunrpc/xprtrdma/svcrdma.ko] undefined!
      ERROR: "rdma_listen" [net/sunrpc/xprtrdma/svcrdma.ko] undefined!
      ERROR: "rdma_create_id" [net/sunrpc/xprtrdma/svcrdma.ko] undefined!
      ERROR: "rdma_create_qp" [net/sunrpc/xprtrdma/svcrdma.ko] undefined!
      ERROR: "rdma_bind_addr" [net/sunrpc/xprtrdma/svcrdma.ko] undefined!
      ERROR: "rdma_disconnect" [net/sunrpc/xprtrdma/svcrdma.ko] undefined!
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      55128bc2
  5. 03 2月, 2009 1 次提交
  6. 02 2月, 2009 2 次提交
  7. 01 2月, 2009 9 次提交
  8. 31 1月, 2009 3 次提交
  9. 30 1月, 2009 15 次提交