This is May 2015 code, based upon 2012 code. Obviously, we haven't been testing error responses.... ;)
Not quite. That would need to be duplicated for each of the error conditions. Instead, it should be a bit higher in the function. Still, I'll keep it duplicated from the ACCEPTED code path, for trivial efficiency. On 12/13/17 1:22 AM, Matt Benjamin wrote:
That sounds right, I'm uncertain whether this has regressed in the text, or maybe in the likelihood of inlining in the new dispatch model. Bill? Matt On Wed, Dec 13, 2017 at 9:38 AM, Pradeep <[email protected]> wrote:Hello, When using krb5 exports, I noticed that TIRPC does not send XID in response - see xdr_reply_encode() for MSG_DENIED case. Looks like Linux clients can't decode the message and go in to an infinite loop retrying the same NFS operation. I tried adding XID back (like it is done for normal case) and it seems to have fixed the problem. Is this the right thing to do? diff --git a/src/rpc_dplx_msg.c b/src/rpc_dplx_msg.c index 01e5a5c..a585e8a 100644 --- a/src/rpc_dplx_msg.c +++ b/src/rpc_dplx_msg.c @@ -194,9 +194,12 @@ xdr_reply_encode(XDR *xdrs, struct rpc_msg *dmsg) __warnx(TIRPC_DEBUG_FLAG_RPC_MSG, "%s:%u DENIED AUTH", __func__, __LINE__); - buf = XDR_INLINE(xdrs, 2 * BYTES_PER_XDR_UNIT); + buf = XDR_INLINE(xdrs, 5 * BYTES_PER_XDR_UNIT); if (buf != NULL) { + IXDR_PUT_INT32(buf, dmsg->rm_xid); + IXDR_PUT_ENUM(buf, dmsg->rm_direction); + IXDR_PUT_ENUM(buf, dmsg->rm_reply.rp_stat); IXDR_PUT_ENUM(buf, rr->rj_stat); IXDR_PUT_ENUM(buf, rr->rj_why); } else if (!xdr_putenum(xdrs, rr->rj_stat)) { ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Nfs-ganesha-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Nfs-ganesha-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel
