1. 19 2月, 2009 2 次提交
  2. 18 2月, 2009 2 次提交
  3. 10 2月, 2009 3 次提交
  4. 05 2月, 2009 1 次提交
    • 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
  5. 01 2月, 2009 1 次提交
  6. 22 1月, 2009 1 次提交
  7. 13 1月, 2009 3 次提交
  8. 30 12月, 2008 2 次提交
  9. 15 12月, 2008 1 次提交
  10. 11 12月, 2008 1 次提交
  11. 08 12月, 2008 1 次提交
  12. 26 11月, 2008 2 次提交
  13. 25 11月, 2008 2 次提交
  14. 24 11月, 2008 1 次提交
    • P
      netfilter: nf_conntrack_proto_sctp: avoid bogus warning · 328bd899
      Patrick McHardy 提交于
      net/netfilter/nf_conntrack_proto_sctp.c: In function 'sctp_packet':
      net/netfilter/nf_conntrack_proto_sctp.c:376: warning: array subscript is above array bounds
      
      gcc doesn't realize that do_basic_checks() guarantees that there is
      at least one valid chunk and thus new_state is never SCTP_CONNTRACK_MAX
      after the loop. Initialize to SCTP_CONNTRACK_NONE to avoid the warning.
      
      Based on patch by Wu Fengguang <wfg@linux.intel.com>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      328bd899
  15. 20 11月, 2008 2 次提交
  16. 18 11月, 2008 4 次提交
  17. 17 11月, 2008 4 次提交
  18. 14 11月, 2008 1 次提交
  19. 11 11月, 2008 1 次提交
  20. 07 11月, 2008 1 次提交
    • H
      ipvs: oldlen, newlen should be be16, not be32 · ca62059b
      Harvey Harrison 提交于
      Noticed by sparse:
      net/netfilter/ipvs/ip_vs_proto_tcp.c:195:6: warning: incorrect type in argument 5 (different base types)
      net/netfilter/ipvs/ip_vs_proto_tcp.c:195:6:    expected restricted __be16 [usertype] oldlen
      net/netfilter/ipvs/ip_vs_proto_tcp.c:195:6:    got restricted __be32 [usertype] <noident>
      net/netfilter/ipvs/ip_vs_proto_tcp.c:196:6: warning: incorrect type in argument 6 (different base types)
      net/netfilter/ipvs/ip_vs_proto_tcp.c:196:6:    expected restricted __be16 [usertype] newlen
      net/netfilter/ipvs/ip_vs_proto_tcp.c:196:6:    got restricted __be32 [usertype] <noident>
      net/netfilter/ipvs/ip_vs_proto_tcp.c:270:6: warning: incorrect type in argument 5 (different base types)
      net/netfilter/ipvs/ip_vs_proto_tcp.c:270:6:    expected restricted __be16 [usertype] oldlen
      net/netfilter/ipvs/ip_vs_proto_tcp.c:270:6:    got restricted __be32 [usertype] <noident>
      net/netfilter/ipvs/ip_vs_proto_tcp.c:271:6: warning: incorrect type in argument 6 (different base types)
      net/netfilter/ipvs/ip_vs_proto_tcp.c:271:6:    expected restricted __be16 [usertype] newlen
      net/netfilter/ipvs/ip_vs_proto_tcp.c:271:6:    got restricted __be32 [usertype] <noident>
      net/netfilter/ipvs/ip_vs_proto_udp.c:206:6: warning: incorrect type in argument 5 (different base types)
      net/netfilter/ipvs/ip_vs_proto_udp.c:206:6:    expected restricted __be16 [usertype] oldlen
      net/netfilter/ipvs/ip_vs_proto_udp.c:206:6:    got restricted __be32 [usertype] <noident>
      net/netfilter/ipvs/ip_vs_proto_udp.c:207:6: warning: incorrect type in argument 6 (different base types)
      net/netfilter/ipvs/ip_vs_proto_udp.c:207:6:    expected restricted __be16 [usertype] newlen
      net/netfilter/ipvs/ip_vs_proto_udp.c:207:6:    got restricted __be32 [usertype] <noident>
      net/netfilter/ipvs/ip_vs_proto_udp.c:282:6: warning: incorrect type in argument 5 (different base types)
      net/netfilter/ipvs/ip_vs_proto_udp.c:282:6:    expected restricted __be16 [usertype] oldlen
      net/netfilter/ipvs/ip_vs_proto_udp.c:282:6:    got restricted __be32 [usertype] <noident>
      net/netfilter/ipvs/ip_vs_proto_udp.c:283:6: warning: incorrect type in argument 6 (different base types)
      net/netfilter/ipvs/ip_vs_proto_udp.c:283:6:    expected restricted __be16 [usertype] newlen
      net/netfilter/ipvs/ip_vs_proto_udp.c:283:6:    got restricted __be32 [usertype] <noident>
      Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
      Acked-by: NSimon Horman <horms@verge.net.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ca62059b
  21. 05 11月, 2008 1 次提交
    • A
      netfilter: netns ct: walk netns list under RTNL · efb9a8c2
      Alexey Dobriyan 提交于
      netns list (just list) is under RTNL. But helper and proto unregistration
      happen during rmmod when RTNL is not held, and that's how it was tested:
      modprobe/rmmod vs clone(CLONE_NEWNET)/exit.
      
      BUG: unable to handle kernel paging request at 0000000000100100	<===
      IP: [<ffffffffa009890f>] nf_conntrack_l4proto_unregister+0x96/0xae [nf_conntrack]
      PGD 15e300067 PUD 15e1d8067 PMD 0
      Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
      last sysfs file: /sys/kernel/uevent_seqnum
      CPU 0
      Modules linked in: nf_conntrack_proto_sctp(-) nf_conntrack_proto_dccp(-) af_packet iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 iptable_filter ip_tables xt_tcpudp ip6table_filter ip6_tables x_tables ipv6 sr_mod cdrom [last unloaded: nf_conntrack_proto_sctp]
      Pid: 16758, comm: rmmod Not tainted 2.6.28-rc2-netns-xfrm #3
      RIP: 0010:[<ffffffffa009890f>]  [<ffffffffa009890f>] nf_conntrack_l4proto_unregister+0x96/0xae [nf_conntrack]
      RSP: 0018:ffff88015dc1fec8  EFLAGS: 00010212
      RAX: 0000000000000000 RBX: 00000000001000f8 RCX: 0000000000000000
      RDX: ffffffffa009575c RSI: 0000000000000003 RDI: ffffffffa00956b5
      RBP: ffff88015dc1fed8 R08: 0000000000000002 R09: 0000000000000000
      R10: 0000000000000000 R11: ffff88015dc1fe48 R12: ffffffffa0458f60
      R13: 0000000000000880 R14: 00007fff4c361d30 R15: 0000000000000880
      FS:  00007f624435a6f0(0000) GS:ffffffff80521580(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
      CR2: 0000000000100100 CR3: 0000000168969000 CR4: 00000000000006e0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      Process rmmod (pid: 16758, threadinfo ffff88015dc1e000, task ffff880179864218)
      Stack:
       ffffffffa0459100 0000000000000000 ffff88015dc1fee8 ffffffffa0457934
       ffff88015dc1ff78 ffffffff80253fef 746e6e6f635f666e 6f72705f6b636172
       00707463735f6f74 ffffffff8024cb30 00000000023b8010 0000000000000000
      Call Trace:
       [<ffffffffa0457934>] nf_conntrack_proto_sctp_fini+0x10/0x1e [nf_conntrack_proto_sctp]
       [<ffffffff80253fef>] sys_delete_module+0x19f/0x1fe
       [<ffffffff8024cb30>] ? trace_hardirqs_on_caller+0xf0/0x114
       [<ffffffff803ea9b2>] ? trace_hardirqs_on_thunk+0x3a/0x3f
       [<ffffffff8020b52b>] system_call_fastpath+0x16/0x1b
      Code: 13 35 e0 e8 c4 6c 1a e0 48 8b 1d 6d c6 46 e0 eb 16 48 89 df 4c 89 e2 48 c7 c6 fc 85 09 a0 e8 61 cd ff ff 48 8b 5b 08 48 83 eb 08 <48> 8b 43 08 0f 18 08 48 8d 43 08 48 3d 60 4f 50 80 75 d3 5b 41
      RIP  [<ffffffffa009890f>] nf_conntrack_l4proto_unregister+0x96/0xae [nf_conntrack]
       RSP <ffff88015dc1fec8>
      CR2: 0000000000100100
      ---[ end trace bde8ac82debf7192 ]---
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      efb9a8c2
  22. 04 11月, 2008 3 次提交