lkml.org 
[lkml]   [2010]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[094/117] udp: fix for unicast RX path optimization
    2.6.33-stable review patch.  If anyone has any objections, please let us know.

    ------------------


    From: Jorge Boncompte [DTI2] <jorge@dti2.net>

    [ Upstream commit 1223c67c0938d2df309fde618bd82c87c8c1af04 ]

    Commits 5051ebd275de672b807c28d93002c2fb0514a3c9 and
    5051ebd275de672b807c28d93002c2fb0514a3c9 ("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: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
    ---
    net/ipv4/udp.c | 4 ++--
    net/ipv6/udp.c | 4 ++--
    2 files changed, 4 insertions(+), 4 deletions(-)

    --- a/net/ipv4/udp.c
    +++ b/net/ipv4/udp.c
    @@ -471,8 +471,8 @@ static struct sock *__udp4_lib_lookup(st
    if (hslot->count < hslot2->count)
    goto begin;

    - result = udp4_lib_lookup2(net, INADDR_ANY, sport,
    - daddr, hnum, dif,
    + result = udp4_lib_lookup2(net, saddr, sport,
    + INADDR_ANY, hnum, dif,
    hslot2, slot2);
    }
    rcu_read_unlock();
    --- a/net/ipv6/udp.c
    +++ b/net/ipv6/udp.c
    @@ -258,8 +258,8 @@ static struct sock *__udp6_lib_lookup(st
    if (hslot->count < hslot2->count)
    goto begin;

    - result = udp6_lib_lookup2(net, &in6addr_any, sport,
    - daddr, hnum, dif,
    + result = udp6_lib_lookup2(net, saddr, sport,
    + &in6addr_any, hnum, dif,
    hslot2, slot2);
    }
    rcu_read_unlock();



    \
     
     \ /
      Last update: 2010-05-12 10:11    [W:0.025 / U:1.344 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site