1. 16 Sep, 2016 26 commits
  2. 15 Sep, 2016 8 commits
  3. 13 Sep, 2016 6 commits
    • David Howells's avatar
      rxrpc: Add IPv6 support · 75b54cb5
      David Howells authored
      Add IPv6 support to AF_RXRPC.  With this, AF_RXRPC sockets can be created:
      	service = socket(AF_RXRPC, SOCK_DGRAM, PF_INET6);
      instead of:
      	service = socket(AF_RXRPC, SOCK_DGRAM, PF_INET);
      The AFS filesystem doesn't support IPv6 at the moment, though, since that
      requires upgrades to some of the RPC calls.
      Note that a good portion of this patch is replacing "%pI4:%u" in print
      statements with "%pISpc" which is able to handle both protocols and print
      the port.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
    • David Howells's avatar
      rxrpc: Use rxrpc_extract_addr_from_skb() rather than doing this manually · 1c2bc7b9
      David Howells authored
      There are two places that want to transmit a packet in response to one just
      received and manually pick the address to reply to out of the sk_buff.
      Make them use rxrpc_extract_addr_from_skb() instead so that IPv6 is handled
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
    • David Howells's avatar
      rxrpc: Don't specify protocol to when creating transport socket · aaa31cbc
      David Howells authored
      Pass 0 as the protocol argument when creating the transport socket rather
      than IPPROTO_UDP.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
    • David Howells's avatar
      rxrpc: Create an address for sendmsg() to bind unbound socket with · cd5892c7
      David Howells authored
      Create an address for sendmsg() to bind unbound socket with rather than
      using a completely blank address otherwise the transport socket creation
      will fail because it will try to use address family 0.
      We use the address family specified in the protocol argument when the
      AF_RXRPC socket was created and SOCK_DGRAM as the default.  For anything
      else, bind() must be used.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
    • David Howells's avatar
      rxrpc: Correctly initialise, limit and transmit call->rx_winsize · 75e42126
      David Howells authored
      call->rx_winsize should be initialised to the sysctl setting and the sysctl
      setting should be limited to the maximum we want to permit.  Further, we
      need to place this in the ACK info instead of the sysctl setting.
      Furthermore, discard the idea of accepting the subpackets of a jumbo packet
      that lie beyond the receive window when the first packet of the jumbo is
      within the window.  Just discard the excess subpackets instead.  This
      allows the receive window to be opened up right to the buffer size less one
      for the dead slot.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
    • David Howells's avatar
      rxrpc: Fix prealloc refcounting · 3432a757
      David Howells authored
      The preallocated call buffer holds a ref on the calls within that buffer.
      The ref was being released in the wrong place - it worked okay for incoming
      calls to the AFS cache manager service, but doesn't work right for incoming
      calls to a userspace service.
      Instead of releasing an extra ref service calls in rxrpc_release_call(),
      the ref needs to be released during the acceptance/rejectance process.  To
      this end:
       (1) The prealloc ref is now normally released during
       (2) For preallocated kernel API calls, the kernel API's ref needs to be
           released when the call is discarded on socket close.
       (3) We shouldn't take a second ref in rxrpc_accept_call().
       (4) rxrpc_recvmsg_new_call() needs to get a ref of its own when it adds
           the call to the to_be_accepted socket queue.
      In doing (4) above, we would prefer not to put the call's refcount down to
      0 as that entails doing cleanup in softirq context, but it's unlikely as
      there are several refs held elsewhere, at least one of which must be put by
      someone in process context calling rxrpc_release_call().  However, it's not
      a problem if we do have to do that.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>