29 Aug, 2017

1 commit

  • Fix IPv6 support in AF_RXRPC in the following ways:

    (1) When extracting the address from a received IPv4 packet, if the local
    transport socket is open for IPv6 then fill out the sockaddr_rxrpc
    struct for an IPv4-mapped-to-IPv6 AF_INET6 transport address instead
    of an AF_INET one.

    (2) When sending CHALLENGE or RESPONSE packets, the transport length needs
    to be set from the sockaddr_rxrpc::transport_len field rather than
    sizeof() on the IPv4 transport address.

    (3) When processing an IPv4 ICMP packet received by an IPv6 socket, set up
    the address correctly before searching for the affected peer.

    Signed-off-by: David Howells

    David Howells
     

17 Sep, 2016

1 commit

  • Add CONFIG_AF_RXRPC_IPV6 and make the IPv6 support code conditional on it.
    This is then made conditional on CONFIG_IPV6.

    Without this, the following can be seen:

    net/built-in.o: In function `rxrpc_init_peer':
    >> peer_object.c:(.text+0x18c3c8): undefined reference to `ip6_route_output_flags'

    Reported-by: kbuild test robot
    Signed-off-by: David Howells
    Signed-off-by: David S. Miller

    David Howells
     

06 Jul, 2016

2 commits


15 Jun, 2016

1 commit

  • Rework peer object handling to use a hash table instead of a flat list and
    to use RCU. Peer objects are no longer destroyed by passing them to a
    workqueue to process, but rather are just passed to the RCU garbage
    collector as kfree'able objects.

    The hash function uses the local endpoint plus all the components of the
    remote address, except for the RxRPC service ID. Peers thus represent a
    UDP port on the remote machine as contacted by a UDP port on this machine.

    The RCU read lock is used to handle non-creating lookups so that they can
    be called from bottom half context in the sk_error_report handler without
    having to lock the hash table against modification.
    rxrpc_lookup_peer_rcu() *does* take a reference on the peer object as in
    the future, this will be passed to a work item for error distribution in
    the error_report path and this function will cease being used in the
    data_ready path.

    Creating lookups are done under spinlock rather than mutex as they might be
    set up due to an external stimulus if the local endpoint is a server.

    Captured network error messages (ICMP) are handled with respect to this
    struct and MTU size and RTT are cached here.

    Signed-off-by: David Howells

    David Howells