1. 29 4月, 2010 3 次提交
  2. 28 4月, 2010 1 次提交
  3. 27 4月, 2010 2 次提交
  4. 26 4月, 2010 1 次提交
  5. 23 4月, 2010 3 次提交
  6. 22 4月, 2010 4 次提交
    • J
      net: ipv6 bind to device issue · f4f914b5
      Jiri Olsa 提交于
      The issue raises when having 2 NICs both assigned the same
      IPv6 global address.
      
      If a sender binds to a particular NIC (SO_BINDTODEVICE),
      the outgoing traffic is being sent via the first found.
      The bonded device is thus not taken into an account during the
      routing.
      
      From the ip6_route_output function:
      
      If the binding address is multicast, linklocal or loopback,
      the RT6_LOOKUP_F_IFACE bit is set, but not for global address.
      
      So binding global address will neglect SO_BINDTODEVICE-binded device,
      because the fib6_rule_lookup function path won't check for the
      flowi::oif field and take first route that fits.
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Signed-off-by: NScott Otto <scott.otto@alcatel-lucent.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f4f914b5
    • S
      ipv6: allow to send packet after receiving ICMPv6 Too Big message with MTU... · f2228f78
      Shan Wei 提交于
      ipv6: allow to send packet after receiving ICMPv6 Too Big message with MTU field less than IPV6_MIN_MTU
      
      According to RFC2460, PMTU is set to the IPv6 Minimum Link
      MTU (1280) and a fragment header should always be included
      after a node receiving Too Big message reporting PMTU is
      less than the IPv6 Minimum Link MTU.
      
      After receiving a ICMPv6 Too Big message reporting PMTU is
      less than the IPv6 Minimum Link MTU, sctp *can't* send any
      data/control chunk that total length including IPv6 head
      and IPv6 extend head is less than IPV6_MIN_MTU(1280 bytes).
      
      The failure occured in p6_fragment(), about reason
      see following(take SHUTDOWN chunk for example):
      sctp_packet_transmit (SHUTDOWN chunk, len=16 byte)
      |------sctp_v6_xmit (local_df=0)
         |------ip6_xmit
             |------ip6_output (dst_allfrag is ture)
                 |------ip6_fragment
      
      In ip6_fragment(), for local_df=0, drops the the packet
      and returns EMSGSIZE.
      
      The patch fixes it with adding check length of skb->len.
      In this case, Ipv6 not to fragment upper protocol data,
      just only add a fragment header before it.
      Signed-off-by: NShan Wei <shanwei@cn.fujitsu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f2228f78
    • A
      X25 fix dead unaccepted sockets · 2cec6b01
      andrew hendry 提交于
      1, An X25 program binds and listens
      2, calls arrive waiting to be accepted
      3, Program exits without accepting
      4, Sockets time out but don't get correctly cleaned up
      5, cat /proc/net/x25/socket shows the dead sockets with bad inode fields.
      
      This line borrowed from AX25 sets the dying socket so the timers clean up later.
      Signed-off-by: NAndrew Hendry <andrew.hendry@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2cec6b01
    • N
      xfrm6: ensure to use the same dev when building a bundle · bc8e4b95
      Nicolas Dichtel 提交于
      When building a bundle, we set dst.dev and rt6.rt6i_idev.
      We must ensure to set the same device for both fields.
      Signed-off-by: NNicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bc8e4b95
  7. 21 4月, 2010 3 次提交
    • D
      net: Fix an RCU warning in dev_pick_tx() · 05d17608
      David Howells 提交于
      Fix the following RCU warning in dev_pick_tx():
      
      ===================================================
      [ INFO: suspicious rcu_dereference_check() usage. ]
      ---------------------------------------------------
      net/core/dev.c:1993 invoked rcu_dereference_check() without protection!
      
      other info that might help us debug this:
      
      rcu_scheduler_active = 1, debug_locks = 0
      2 locks held by swapper/0:
       #0:  (&idev->mc_ifc_timer){+.-...}, at: [<ffffffff81039e65>] run_timer_softirq+0x17b/0x278
       #1:  (rcu_read_lock_bh){.+....}, at: [<ffffffff812ea3eb>] dev_queue_xmit+0x14e/0x4dc
      
      stack backtrace:
      Pid: 0, comm: swapper Not tainted 2.6.34-rc5-cachefs #4
      Call Trace:
       <IRQ>  [<ffffffff810516c4>] lockdep_rcu_dereference+0xaa/0xb2
       [<ffffffff812ea4f6>] dev_queue_xmit+0x259/0x4dc
       [<ffffffff812ea3eb>] ? dev_queue_xmit+0x14e/0x4dc
       [<ffffffff81052324>] ? trace_hardirqs_on+0xd/0xf
       [<ffffffff81035362>] ? local_bh_enable_ip+0xbc/0xc1
       [<ffffffff812f0954>] neigh_resolve_output+0x24b/0x27c
       [<ffffffff8134f673>] ip6_output_finish+0x7c/0xb4
       [<ffffffff81350c34>] ip6_output2+0x256/0x261
       [<ffffffff81052324>] ? trace_hardirqs_on+0xd/0xf
       [<ffffffff813517fb>] ip6_output+0xbbc/0xbcb
       [<ffffffff8135bc5d>] ? fib6_force_start_gc+0x2b/0x2d
       [<ffffffff81368acb>] mld_sendpack+0x273/0x39d
       [<ffffffff81368858>] ? mld_sendpack+0x0/0x39d
       [<ffffffff81052099>] ? mark_held_locks+0x52/0x70
       [<ffffffff813692fc>] mld_ifc_timer_expire+0x24f/0x288
       [<ffffffff81039ed6>] run_timer_softirq+0x1ec/0x278
       [<ffffffff81039e65>] ? run_timer_softirq+0x17b/0x278
       [<ffffffff813690ad>] ? mld_ifc_timer_expire+0x0/0x288
       [<ffffffff81035531>] ? __do_softirq+0x69/0x140
       [<ffffffff8103556a>] __do_softirq+0xa2/0x140
       [<ffffffff81002e0c>] call_softirq+0x1c/0x28
       [<ffffffff81004b54>] do_softirq+0x38/0x80
       [<ffffffff81034f06>] irq_exit+0x45/0x47
       [<ffffffff810177c3>] smp_apic_timer_interrupt+0x88/0x96
       [<ffffffff810028d3>] apic_timer_interrupt+0x13/0x20
       <EOI>  [<ffffffff810488dd>] ? __atomic_notifier_call_chain+0x0/0x86
       [<ffffffff810096bf>] ? mwait_idle+0x6e/0x78
       [<ffffffff810096b6>] ? mwait_idle+0x65/0x78
       [<ffffffff810011cb>] cpu_idle+0x4d/0x83
       [<ffffffff81380b05>] rest_init+0xb9/0xc0
       [<ffffffff81380a4c>] ? rest_init+0x0/0xc0
       [<ffffffff8168dcf0>] start_kernel+0x392/0x39d
       [<ffffffff8168d2a3>] x86_64_start_reservations+0xb3/0xb7
       [<ffffffff8168d38b>] x86_64_start_kernel+0xe4/0xeb
      
      An rcu_dereference() should be an rcu_dereference_bh().
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      05d17608
    • H
      ipv6: Fix tcp_v6_send_response transport header setting. · 6651ffc8
      Herbert Xu 提交于
      My recent patch to remove the open-coded checksum sequence in
      tcp_v6_send_response broke it as we did not set the transport
      header pointer on the new packet.
      
      Actually, there is code there trying to set the transport
      header properly, but it sets it for the wrong skb ('skb'
      instead of 'buff').
      
      This bug was introduced by commit
      a8fdf2b3 ("ipv6: Fix
      tcp_v6_send_response(): it didn't set skb transport header")
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6651ffc8
    • E
      bridge: add a missing ntohs() · 8eabf95c
      Eric Dumazet 提交于
      grec_nsrcs is in network order, we should convert to host horder in
      br_multicast_igmp3_report()
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Acked-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8eabf95c
  8. 20 4月, 2010 2 次提交
  9. 17 4月, 2010 1 次提交
  10. 16 4月, 2010 1 次提交
    • E
      ip: Fix ip_dev_loopback_xmit() · e30b38c2
      Eric Dumazet 提交于
      Eric Paris got following trace with a linux-next kernel
      
      [   14.203970] BUG: using smp_processor_id() in preemptible [00000000]
      code: avahi-daemon/2093
      [   14.204025] caller is netif_rx+0xfa/0x110
      [   14.204035] Call Trace:
      [   14.204064]  [<ffffffff81278fe5>] debug_smp_processor_id+0x105/0x110
      [   14.204070]  [<ffffffff8142163a>] netif_rx+0xfa/0x110
      [   14.204090]  [<ffffffff8145b631>] ip_dev_loopback_xmit+0x71/0xa0
      [   14.204095]  [<ffffffff8145b892>] ip_mc_output+0x192/0x2c0
      [   14.204099]  [<ffffffff8145d610>] ip_local_out+0x20/0x30
      [   14.204105]  [<ffffffff8145d8ad>] ip_push_pending_frames+0x28d/0x3d0
      [   14.204119]  [<ffffffff8147f1cc>] udp_push_pending_frames+0x14c/0x400
      [   14.204125]  [<ffffffff814803fc>] udp_sendmsg+0x39c/0x790
      [   14.204137]  [<ffffffff814891d5>] inet_sendmsg+0x45/0x80
      [   14.204149]  [<ffffffff8140af91>] sock_sendmsg+0xf1/0x110
      [   14.204189]  [<ffffffff8140dc6c>] sys_sendmsg+0x20c/0x380
      [   14.204233]  [<ffffffff8100ad82>] system_call_fastpath+0x16/0x1b
      
      While current linux-2.6 kernel doesnt emit this warning, bug is latent
      and might cause unexpected failures.
      
      ip_dev_loopback_xmit() runs in process context, preemption enabled, so
      must call netif_rx_ni() instead of netif_rx(), to make sure that we
      process pending software interrupt.
      
      Same change for ip6_dev_loopback_xmit()
      Reported-by: NEric Paris <eparis@redhat.com>
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e30b38c2
  11. 15 4月, 2010 2 次提交
  12. 13 4月, 2010 1 次提交
  13. 11 4月, 2010 1 次提交
  14. 09 4月, 2010 2 次提交
    • D
      tcp: Set CHECKSUM_UNNECESSARY in tcp_init_nondata_skb · 2626419a
      David S. Miller 提交于
      Back in commit 04a0551c
      ("loopback: Drop obsolete ip_summed setting") we stopped
      setting CHECKSUM_UNNECESSARY in the loopback xmit.
      
      This is because such a setting was a lie since it implies that the
      checksum field of the packet is properly filled in.
      
      Instead what happens normally is that CHECKSUM_PARTIAL is set and
      skb->csum is calculated as needed.
      
      But this was only happening for TCP data packets (via the
      skb->ip_summed assignment done in tcp_sendmsg()).  It doesn't
      happen for non-data packets like ACKs etc.
      
      Fix this by setting skb->ip_summed in the common non-data packet
      constructor.  It already is setting skb->csum to zero.
      
      But this reminds us that we still have things like ip_output.c's
      ip_dev_loopback_xmit() which sets skb->ip_summed to the value
      CHECKSUM_UNNECESSARY, which Herbert's patch teaches us is not
      valid.  So we'll have to address that at some point too.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2626419a
    • J
      udp: fix for unicast RX path optimization · 1223c67c
      Jorge Boncompte [DTI2] 提交于
      Commits 5051ebd2 and
      5051ebd2 ("ipv[46]: udp: optimize unicast RX
      path") broke some programs.
      
      	After upgrading a L2TP server to 2.6.33 it started to fail, tunnels going up an
      down, after the 10th tunnel came up. My modified rp-l2tp uses a global
      unconnected socket bound to (INADDR_ANY, 1701) and one connected socket per
      tunnel after parameter negotiation.
      
      	After ten sockets were open and due to mixed parameters to
      udp[46]_lib_lookup2() kernel started to drop packets.
      Signed-off-by: NJorge Boncompte [DTI2] <jorge@dti2.net>
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1223c67c
  15. 08 4月, 2010 3 次提交
  16. 07 4月, 2010 2 次提交
  17. 06 4月, 2010 2 次提交
  18. 05 4月, 2010 1 次提交
  19. 02 4月, 2010 2 次提交
    • P
      netlabel: Fix several rcu_dereference() calls used without RCU read locks · b914f3a2
      Paul Moore 提交于
      The recent changes to add RCU lock verification to rcu_dereference() calls
      caught out a problem with netlbl_unlhsh_hash(), see below.
      
       ===================================================
       [ INFO: suspicious rcu_dereference_check() usage. ]
       ---------------------------------------------------
       net/netlabel/netlabel_unlabeled.c:246 invoked rcu_dereference_check()
       without protection!
      
      This patch fixes this problem as well as others like it in the NetLabel
      code.  Also included in this patch is the identification of future work
      to eliminate the RCU read lock in netlbl_domhsh_add(), but in the interest
      of getting this patch out quickly that work will happen in another patch
      to be finished later.
      
      Thanks to Eric Dumazet and Paul McKenney for their help in understanding
      the recent RCU changes.
      Signed-off-by: NPaul Moore <paul.moore@hp.com>
      Reported-by: NDavid Howells <dhowells@redhat.com>
      CC: Eric Dumazet <eric.dumazet@gmail.com>
      CC: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b914f3a2
    • C
      net: check the length of the socket address passed to connect(2) · 6503d961
      Changli Gao 提交于
      check the length of the socket address passed to connect(2).
      
      Check the length of the socket address passed to connect(2). If the
      length is invalid, -EINVAL will be returned.
      Signed-off-by: NChangli Gao <xiaosuo@gmail.com>
      ----
      net/bluetooth/l2cap.c | 3 ++-
      net/bluetooth/rfcomm/sock.c | 3 ++-
      net/bluetooth/sco.c | 3 ++-
      net/can/bcm.c | 3 +++
      net/ieee802154/af_ieee802154.c | 3 +++
      net/ipv4/af_inet.c | 5 +++++
      net/netlink/af_netlink.c | 3 +++
      7 files changed, 20 insertions(+), 3 deletions(-)
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6503d961
  20. 31 3月, 2010 3 次提交