From patchwork Thu Jun 5 13:48:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Dickson X-Patchwork-Id: 4305461 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8E97EBEEA7 for ; Thu, 5 Jun 2014 13:48:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DE02E2017A for ; Thu, 5 Jun 2014 13:48:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 19F232015E for ; Thu, 5 Jun 2014 13:48:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751174AbaFENs3 (ORCPT ); Thu, 5 Jun 2014 09:48:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58356 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751140AbaFENs2 (ORCPT ); Thu, 5 Jun 2014 09:48:28 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s55DmJmv027265 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 5 Jun 2014 09:48:20 -0400 Received: from smallhat.boston.devel.redhat.com (vpn-62-20.rdu2.redhat.com [10.10.62.20]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s55DmIiJ028321; Thu, 5 Jun 2014 09:48:19 -0400 From: Steve Dickson To: Libtirpc-devel Mailing List Cc: Linux NFS Mailing list Subject: [PATCH] xdr_rejected_reply: Don't crash with invalid server rejection Date: Thu, 5 Jun 2014 09:48:16 -0400 Message-Id: <1401976096-16802-1-git-send-email-steved@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP It seems legacy servers like to return invalid rejection status when a RPC is rejected. This should not crash the app then it happens. Signed-off-by: Steve Dickson --- src/rpc_prot.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/rpc_prot.c b/src/rpc_prot.c index e562deb..5841e51 100644 --- a/src/rpc_prot.c +++ b/src/rpc_prot.c @@ -150,7 +150,6 @@ xdr_rejected_reply(xdrs, rr) return (xdr_enum(xdrs, (enum_t *)&(rr->rj_why))); } /* NOTREACHED */ - assert(0); return (FALSE); }