08 Jun, 2007

1 commit


25 May, 2007

1 commit

  • The current IPSEC rule resolution behavior we have does not work for a
    lot of people, even though technically it's an improvement from the
    -EAGAIN buisness we had before.

    Right now we'll block until the key manager resolves the route. That
    works for simple cases, but many folks would rather packets get
    silently dropped until the key manager resolves the IPSEC rules.

    We can't tell these folks to "set the socket non-blocking" because
    they don't have control over the non-block setting of things like the
    sockets used to resolve DNS deep inside of the resolver libraries in
    libc.

    With that in mind I coded up the patch below with some help from
    Herbert Xu which provides packet-drop behavior during larval state
    resolution, controllable via sysctl and off by default.

    This lays the framework to either:

    1) Make this default at some point or...

    2) Move this logic into xfrm{4,6}_policy.c and implement the
    ARP-like resolution queue we've all been dreaming of.
    The idea would be to queue packets to the policy, then
    once the larval state is resolved by the key manager we
    re-resolve the route and push the packets out. The
    packets would timeout if the rule didn't get resolved
    in a certain amount of time.

    Signed-off-by: David S. Miller

    David S. Miller
     

26 Apr, 2007

6 commits


14 Apr, 2007

1 commit

  • A packet which is being discarded because of no routes in the
    forwarding path should not be counted as OutNoRoutes but as
    InNoRoutes.
    Additionally, on this occasion, a packet whose destinaion is
    not valid should be counted as InAddrErrors separately.

    Based on patch from Mitsuru Chinen .

    Signed-off-by: YOSHIFUJI Hideaki
    Signed-off-by: David S. Miller

    YOSHIFUJI Hideaki
     

07 Apr, 2007

1 commit


26 Mar, 2007

1 commit

  • As per RFC2461, section 6.3.6, item #2, when no routers on the
    matching list are known to be reachable or probably reachable we
    do round robin on those available routes so that we make sure
    to probe as many of them as possible to detect when one becomes
    reachable faster.

    Each routing table has a rwlock protecting the tree and the linked
    list of routes at each leaf. The round robin code executes during
    lookup and thus with the rwlock taken as a reader. A small local
    spinlock tries to provide protection but this does not work at all
    for two reasons:

    1) The round-robin list manipulation, as coded, goes like this (with
    read lock held):

    walk routes finding head and tail

    spin_lock();
    rotate list using head and tail
    spin_unlock();

    While one thread is rotating the list, another thread can
    end up with stale values of head and tail and then proceed
    to corrupt the list when it gets the lock. This ends up causing
    the OOPS in fib6_add() later onthat many people have been hitting.

    2) All the other code paths that run with the rwlock held as
    a reader do not expect the list to change on them, they
    expect it to remain completely fixed while they hold the
    lock in that way.

    So, simply stated, it is impossible to implement this correctly using
    a manipulation of the list without violating the rwlock locking
    semantics.

    Reimplement using a per-fib6_node round-robin pointer. This way we
    don't need to manipulate the list at all, and since the round-robin
    pointer can only ever point to real existing entries we don't need
    to perform any locking on the changing of the round-robin pointer
    itself. We only need to reset the round-robin pointer to NULL when
    the entry it is pointing to is removed.

    The idea is from Thomas Graf and it is very similar to how this
    was implemented before the advanced router selection code when in.

    Signed-off-by: David S. Miller

    David S. Miller
     

23 Mar, 2007

1 commit

  • Turning up the warnings on gcc makes it emit warnings
    about the placement of 'inline' in function declarations.
    Here's everything that was under net/

    Signed-off-by: Dave Jones
    Signed-off-by: David S. Miller

    Dave Jones
     

13 Feb, 2007

1 commit

  • Many struct file_operations in the kernel can be "const". Marking them const
    moves these to the .rodata section, which avoids false sharing with potential
    dirty data. In addition it'll catch accidental writes at compile time to
    these shared resources.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

11 Feb, 2007

2 commits


09 Feb, 2007

2 commits


24 Jan, 2007

1 commit


14 Dec, 2006

1 commit


03 Dec, 2006

9 commits


22 Nov, 2006

3 commits


19 Oct, 2006

4 commits


16 Oct, 2006

1 commit

  • Fixes rt6_lookup() to provide the source address in the flow
    and sets RT6_LOOKUP_F_HAS_SADDR whenever it is present in
    the flow.

    Avoids unnecessary prefix comparisons by checking for a prefix
    length first.

    Fixes the rule logic to not match packets if a source selector
    has been specified but no source address is available.

    Thanks to Kim Nordlund for working
    on this patch with me.

    Signed-off-by: Thomas Graf
    Acked-by: Ville Nuorvala
    Signed-off-by: David S. Miller

    Thomas Graf
     

23 Sep, 2006

4 commits