1. 29 Aug, 2017 8 commits
    • David Howells's avatar
      rxrpc: Allow failed client calls to be retried · c038a58c
      David Howells authored
      Allow a client call that failed on network error to be retried, provided
      that the Tx queue still holds DATA packet 1.  This allows an operation to
      be submitted to another server or another address for the same server
      without having to repackage and re-encrypt the data so far processed.
      
      Two new functions are provided:
      
       (1) rxrpc_kernel_check_call() - This is used to find out the completion
           state of a call to guess whether it can be retried and whether it
           should be retried.
      
       (2) rxrpc_kernel_retry_call() - Disconnect the call from its current
           connection, reset the state and submit it as a new client call to a
           new address.  The new address need not match the previous address.
      
      A call may be retried even if all the data hasn't been loaded into it yet;
      a partially constructed will be retained at the same point it was at when
      an error condition was detected.  msg_data_left() can be used to find out
      how much data was packaged before the error occurred.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      c038a58c
    • David Howells's avatar
      rxrpc: Add notification of end-of-Tx phase · e833251a
      David Howells authored
      Add a callback to rxrpc_kernel_send_data() so that a kernel service can get
      a notification that the AF_RXRPC call has transitioned out the Tx phase and
      is now waiting for a reply or a final ACK.
      
      This is called from AF_RXRPC with the call state lock held so the
      notification is guaranteed to come before any reply is passed back.
      
      Further, modify the AFS filesystem to make use of this so that we don't have
      to change the afs_call state before sending the last bit of data.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      e833251a
    • David Howells's avatar
      rxrpc: Remove some excess whitespace · 3ec0efde
      David Howells authored
      Remove indentation from some blank lines.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      3ec0efde
    • David Howells's avatar
      rxrpc: Don't negate call->error before returning it · bd2db2d2
      David Howells authored
      call->error is stored as 0 or a negative error code.  Don't negate this
      value (ie. make it positive) before returning it from a kernel function
      (though it should still be negated before passing to userspace through a
      control message).
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      bd2db2d2
    • David Howells's avatar
      rxrpc: Fix IPv6 support · 7b674e39
      David Howells authored
      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: default avatarDavid Howells <dhowells@redhat.com>
      7b674e39
    • David Howells's avatar
      rxrpc: Use correct timestamp from Kerberos 5 ticket · 0a378585
      David Howells authored
      When an XDR-encoded Kerberos 5 ticket is added as an rxrpc-type key, the
      expiry time should be drawn from the k5 part of the token union (which was
      what was filled in), rather than the kad part of the union.
      Reported-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      0a378585
    • Baolin Wang's avatar
      net: rxrpc: Replace time_t type with time64_t type · 10674a03
      Baolin Wang authored
      Since the 'expiry' variable of 'struct key_preparsed_payload' has been
      changed to 'time64_t' type, which is year 2038 safe on 32bits system.
      
      In net/rxrpc subsystem, we need convert 'u32' type to 'time64_t' type
      when copying ticket expires time to 'prep->expiry', then this patch
      introduces two helper functions to help convert 'u32' to 'time64_t'
      type.
      
      This patch also uses ktime_get_real_seconds() to get current time instead
      of get_seconds() which is not year 2038 safe on 32bits system.
      Signed-off-by: default avatarBaolin Wang <baolin.wang@linaro.org>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      10674a03
    • Vitaly Kuznetsov's avatar
      hinic: don't build the module by default · c8488a8a
      Vitaly Kuznetsov authored
      We probably don't want to enable code supporting particular hardware by
      default e.g. when someone does 'make defconfig'. Other ethernet modules
      don't do it.
      Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c8488a8a
  2. 28 Aug, 2017 32 commits