15 Mar, 2011

13 commits


14 Mar, 2011

27 commits

  • After commit 7b46ac4e77f3224a (inetpeer: Don't disable BH for initial
    fast RCU lookup.), we should use call_rcu() to wait proper RCU grace
    period.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • This patch adds a netlink based user interface to configure
    esn and big anti-replay windows. The new netlink attribute
    XFRMA_REPLAY_ESN_VAL is used to configure the new implementation.
    If the XFRM_STATE_ESN flag is set, we use esn and support for big
    anti-replay windows for the configured state. If this flag is not
    set we use the new implementation with 32 bit sequence numbers.
    A big anti-replay window can be configured in this case anyway.

    Signed-off-by: Steffen Klassert
    Acked-by: Herbert Xu
    Signed-off-by: David S. Miller

    Steffen Klassert
     
  • This patch adds support for IPsec extended sequence numbers (esn)
    as defined in RFC 4303. The bits to manage the anti-replay window
    are based on a patch from Alex Badea.

    Signed-off-by: Steffen Klassert
    Acked-by: Herbert Xu
    Signed-off-by: David S. Miller

    Steffen Klassert
     
  • As it is, the anti-replay bitmap in struct xfrm_replay_state can
    only accomodate 32 packets. Even though it is possible to configure
    anti-replay window sizes up to 255 packets from userspace. So we
    reject any packet with a sequence number within the configured window
    but outside the bitmap. With this patch, we represent the anti-replay
    window as a bitmap of variable length that can be accessed via the
    new struct xfrm_replay_state_esn. Thus, we have no limit on the
    window size anymore. To use the new anti-replay window implementantion,
    new userspace tools are required. We leave the old implementation
    untouched to stay in sync with old userspace tools.

    Signed-off-by: Steffen Klassert
    Acked-by: Herbert Xu
    Signed-off-by: David S. Miller

    Steffen Klassert
     
  • To support multiple versions of replay detection, we move the replay
    detection functions to a separate file and make them accessible
    via function pointers contained in the struct xfrm_replay.

    Signed-off-by: Steffen Klassert
    Acked-by: Herbert Xu
    Signed-off-by: David S. Miller

    Steffen Klassert
     
  • This patch adds IPsec extended sequence numbers support to esp6.
    We use the authencesn crypto algorithm to handle esp with separate
    encryption/authentication algorithms.

    Signed-off-by: Steffen Klassert
    Acked-by: Herbert Xu
    Signed-off-by: David S. Miller

    Steffen Klassert
     
  • This patch adds IPsec extended sequence numbers support to esp4.
    We use the authencesn crypto algorithm to handle esp with separate
    encryption/authentication algorithms.

    Signed-off-by: Steffen Klassert
    Acked-by: Herbert Xu
    Signed-off-by: David S. Miller

    Steffen Klassert
     
  • To support IPsec extended sequence numbers, we split the
    output sequence numbers of xfrm_skb_cb in low and high order 32 bits
    and we add the high order 32 bits to the input sequence numbers.
    All users are updated accordingly.

    Signed-off-by: Steffen Klassert
    Acked-by: Herbert Xu
    Signed-off-by: David S. Miller

    Steffen Klassert
     
  • This patch adds the struct xfrm_replay_state_esn which will be
    used to support IPsec extended sequence numbers and anti replay windows
    bigger than 32 packets. Also we add a function that returns the actual
    size of the xfrm_replay_state_esn, a xfrm netlink atribute and a xfrm state
    flag for the use of extended sequence numbers.

    Signed-off-by: Steffen Klassert
    Acked-by: Herbert Xu
    Signed-off-by: David S. Miller

    Steffen Klassert
     
  • ESP with separate encryption/authentication algorithms needs a special
    treatment for the associated data. This patch add a new algorithm that
    handles esp with extended sequence numbers.

    Signed-off-by: Steffen Klassert
    Acked-by: Herbert Xu
    Signed-off-by: David S. Miller

    Steffen Klassert
     
  • David S. Miller
     
  • On current net-next-2.6, when Linux receives ICMP Type: 3, Code: 4
    (Destination unreachable (Fragmentation needed)),

    icmp_unreach
    -> ip_rt_frag_needed
    (peer->pmtu_expires is set here)
    -> tcp_v4_err
    -> do_pmtu_discovery
    -> ip_rt_update_pmtu
    (peer->pmtu_expires is already set,
    so check_peer_pmtu is skipped.)
    -> check_peer_pmtu

    check_peer_pmtu is skipped and MTU is not updated.

    To fix this, let check_peer_pmtu execute unconditionally.
    And some minor fixes
    1) Avoid potential peer->pmtu_expires set to be zero.
    2) In check_peer_pmtu, argument of time_before is reversed.
    3) check_peer_pmtu expects peer->pmtu_orig is initialized as zero,
    but not initialized.

    Signed-off-by: Hiroaki SHIMODA
    Signed-off-by: David S. Miller

    Hiroaki SHIMODA
     
  • Updates TIPC maintenance information to reflect changes that have
    taken place during TIPC 2.0 development, including:

    - removal of directories that have been deleted
    - removal of websites that have been decommisioned
    - removal of sidestream SCM repositories that are no longer used
    - addition of netdev as appropriate list for kernel code.

    Grateful acknowledgement is given to Joe Perches ,
    who reported the stale file entry that triggered the update.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Eliminates a routine that is used in handling messages arriving from
    another cluster or zone. Such messages can no longer be received by TIPC
    now that multi-cluster and multi-zone network support has been eliminated.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Gets rid of all remaining code relating to ROUTE_DISTRIBUTOR messages.
    These messages were only used in multi-cluster and multi-zone networks,
    which TIPC no longer supports. (For safety, TIPC now treats such messages
    the same way that it handles other unrecognized messages.)

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Eliminates the flag in the TIPC bearer structure that indicates if
    the bearer supports broadcasting, since the flag is always set to 1
    and serves no useful purpose.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Adds a check to prevent TIPC from trying to respond to an incoming
    LINK_CONFIG request message if the associated bearer is currently
    prohibited from sending messages.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Eliminates an unnecessary constant that defines the size of a LINK_CONFIG
    message, and uses one of the existing standard message size symbols in
    its place. (The defunct constant was located in the wrong place anyway,
    since it was grouped with other constants that define message users instead
    of message sizes.)

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Eliminates a field in TIPC's bearer objects that is set, but never
    referenced.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Renames items that are improperly labelled as "network scope" items
    (which are represented by simple integer values) rather than "network
    domain" items (which are represented by -type network addresses).
    This change is purely cosmetic, and does not affect the operation of TIPC.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Enhances link creation code as follows:

    1) Detects illegal attempts to add a requested link earlier in the
    link creation process. This prevents TIPC from wasting time
    initializing a link object it then throws away, and also eliminates
    the code needed to do the throwing away.

    2) Passes in the node object associated with the requested link.
    This allows TIPC to eliminate a search to locate the node object,
    as well as code that attempted to create the node if it doesn't
    exist.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Delay releasing the node lock when processing a neighbor discovery
    message until after the optional discovery response message has been
    sent. This helps ensure that any link protocol messages sent by a
    link endpoint created as a result of a neighbor discovery request
    are received after the discovery response is received, thereby
    giving the receiving node a chance to create a peer link endpoint to
    consume those link protocol messages, if one does not already exist.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Reworks the appearance of the routine that processes incoming
    LINK_CONFIG messages to keep the main logic flow at a consistent level
    of indentation, and to add comments outlining the various phases involved
    in processing each message. This rework is being done to allow upcoming
    enhancements to this routine to be integrated more cleanly.

    The diff isn't really readable, so know that it was a case of the
    old code being like:

    tipc_disc_recv_msg(..)
    {
    if (in_own_cluster(orig)) {
    ...
    lines and lines of stuff
    ...
    }
    }

    which is now replaced with the more sane:

    tipc_disc_recv_msg(..)
    {
    if (!in_own_cluster(orig))
    return;
    ...
    lines and lines of stuff
    ...
    }

    Instances of spin locking within the reindented block were replaced with
    the identical tipc_node_[un]lock() abstractions. Note that all these
    changes are cosmetic in nature, and do not change the way LINK_CONFIG
    messages are processed.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Ensures that the "redundant link exists" field of the LINK_PROTOCOL
    messages sent by a link endpoint is set if and only if the sending
    node has at least one other working link to the peer node. Previously,
    the bit was set only if there were at least 2 working links to the peer
    node, meaning the bit was incorrectly left unset in messages sent by a
    non-working link endpoint when exactly one alternate working link was
    available. The revised code now takes the state of the link sending
    the message into account when deciding if an alternate link exists.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • All the other boolean like msg_set_X(m) operations don't
    export both a msg_set_X(a) and a msg_clear_X(m), but instead
    just have the single msg_set_X(m, val) variant.

    Make the redundant_link one consistent by having the set take
    a value, and delete the msg_clear_redundant_link() anomoly.
    This is a cosmetic change and should not change behaviour.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Function names like "tipc_node_has_redundant_links" are unweildy
    and result in long lines even for simple lines. The "has" doesn't
    contribute any value add, so dropping that is a slight step in the
    right direction. This is a cosmetic change, basic result of:

    for i in `grep -l tipc_node_has_ *` ; do sed -i s/tipc_node_has_/tipc_node_/ $i ; done

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     
  • Removes support for the timestamp field of TIPC's link protocol messages.

    This field was previously used to hold an OS-dependent timestamp value
    that was used to assist in debugging early versions of TIPC. The field
    has now been deemed unnecessary and has been removed from the latest TIPC
    specification. This change has no impact on the operation of TIPC since
    the field was set by TIPC, but never referenced.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens