From owner-svn-src-head@FreeBSD.ORG Sun Sep 7 18:05:38 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 584059F9; Sun, 7 Sep 2014 18:05:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29EB11955; Sun, 7 Sep 2014 18:05:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s87I5ckM021154; Sun, 7 Sep 2014 18:05:38 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s87I5b1m021150; Sun, 7 Sep 2014 18:05:37 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201409071805.s87I5b1m021150@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 7 Sep 2014 18:05:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271230 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 18:05:38 -0000 Author: tuexen Date: Sun Sep 7 18:05:37 2014 New Revision: 271230 URL: http://svnweb.freebsd.org/changeset/base/271230 Log: Address warnings generated by the clang analyzer. MFC after: 1 week Modified: head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Sun Sep 7 17:42:32 2014 (r271229) +++ head/sys/netinet/sctp_input.c Sun Sep 7 18:05:37 2014 (r271230) @@ -2882,9 +2882,9 @@ sctp_handle_cookie_ack(struct sctp_cooki SCTPDBG(SCTP_DEBUG_INPUT2, "sctp_handle_cookie_ack: handling COOKIE-ACK\n"); - if (stcb == NULL) + if ((stcb == NULL) || (net == NULL)) { return; - + } asoc = &stcb->asoc; sctp_stop_all_cookie_timers(stcb); Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Sun Sep 7 17:42:32 2014 (r271229) +++ head/sys/netinet/sctp_output.c Sun Sep 7 18:05:37 2014 (r271230) @@ -5921,8 +5921,8 @@ do_a_abort: parameter_len = (uint16_t) sizeof(struct sctp_paramhdr); ph = (struct sctp_paramhdr *)(mtod(m, caddr_t)+chunk_len); ph->param_type = htons(SCTP_HAS_NAT_SUPPORT); - ph->param_length = htons(sizeof(struct sctp_paramhdr)); - chunk_len += sizeof(struct sctp_paramhdr); + ph->param_length = htons(parameter_len); + chunk_len += parameter_len; } /* And now tell the peer which extensions we support */ num_ext = 0; Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Sun Sep 7 17:42:32 2014 (r271229) +++ head/sys/netinet/sctp_pcb.c Sun Sep 7 18:05:37 2014 (r271230) @@ -6123,7 +6123,6 @@ sctp_load_addresses_from_init(struct sct peer_supports_prsctp = 0; peer_supports_auth = 0; peer_supports_asconf = 0; - peer_supports_asconf = 0; peer_supports_reconfig = 0; peer_supports_nrsack = 0; peer_supports_pktdrop = 0;