From owner-svn-src-user@FreeBSD.ORG Fri Nov 15 11:15:31 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 511BEE32; Fri, 15 Nov 2013 11:15:31 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 418732208; Fri, 15 Nov 2013 11:15:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAFBFVcI076558; Fri, 15 Nov 2013 11:15:31 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAFBFV5R076557; Fri, 15 Nov 2013 11:15:31 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201311151115.rAFBFV5R076557@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Fri, 15 Nov 2013 11:15:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r258163 - user/ae/inet6/sys/netinet6 X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Nov 2013 11:15:31 -0000 Author: ae Date: Fri Nov 15 11:15:30 2013 New Revision: 258163 URL: http://svnweb.freebsd.org/changeset/base/258163 Log: Properly initialize sin6_scope_id instead of embedding zone index. Modified: user/ae/inet6/sys/netinet6/sctp6_usrreq.c Modified: user/ae/inet6/sys/netinet6/sctp6_usrreq.c ============================================================================== --- user/ae/inet6/sys/netinet6/sctp6_usrreq.c Fri Nov 15 10:28:59 2013 (r258162) +++ user/ae/inet6/sys/netinet6/sctp6_usrreq.c Fri Nov 15 11:15:30 2013 (r258163) @@ -138,17 +138,17 @@ sctp6_input_with_port(struct mbuf **i_pa src.sin6_len = sizeof(struct sockaddr_in6); src.sin6_port = sh->src_port; src.sin6_addr = ip6->ip6_src; - if (in6_setscope(&src.sin6_addr, m->m_pkthdr.rcvif, NULL) != 0) { - goto out; - } + src.sin6_scope_id = in6_getscopezone(m->m_pkthdr.rcvif, + in6_addrscope(&ip6->ip6_src)); + memset(&dst, 0, sizeof(struct sockaddr_in6)); dst.sin6_family = AF_INET6; dst.sin6_len = sizeof(struct sockaddr_in6); dst.sin6_port = sh->dest_port; dst.sin6_addr = ip6->ip6_dst; - if (in6_setscope(&dst.sin6_addr, m->m_pkthdr.rcvif, NULL) != 0) { - goto out; - } + dst.sin6_scope_id = in6_getscopezone(m->m_pkthdr.rcvif, + in6_addrscope(&ip6->ip6_dst)); + if (faithprefix_p != NULL && (*faithprefix_p) (&dst.sin6_addr)) { /* XXX send icmp6 host/port unreach? */ goto out;