From owner-svn-src-user@FreeBSD.ORG Fri Nov 29 04:18:37 2013 Return-Path: Delivered-To: svn-src-user@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 6984CD0A; Fri, 29 Nov 2013 04:18:37 +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 561FA1B7D; Fri, 29 Nov 2013 04:18:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAT4IbcA062379; Fri, 29 Nov 2013 04:18:37 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAT4IbvH062378; Fri, 29 Nov 2013 04:18:37 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201311290418.rAT4IbvH062378@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Fri, 29 Nov 2013 04:18:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r258729 - user/ae/inet6/sys/net 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, 29 Nov 2013 04:18:37 -0000 Author: ae Date: Fri Nov 29 04:18:36 2013 New Revision: 258729 URL: http://svnweb.freebsd.org/changeset/base/258729 Log: Some software use embedded form of zone ids. Remove ids from the address and initialize sin6_scope_id. Use sa6_recoverscope function for this. Modified: user/ae/inet6/sys/net/rtsock.c Modified: user/ae/inet6/sys/net/rtsock.c ============================================================================== --- user/ae/inet6/sys/net/rtsock.c Fri Nov 29 04:09:25 2013 (r258728) +++ user/ae/inet6/sys/net/rtsock.c Fri Nov 29 04:18:36 2013 (r258729) @@ -1036,6 +1036,15 @@ rt_xaddrs(caddr_t cp, caddr_t cplim, str return (0); /* should be EINVAL but for compat */ } /* accept it */ +#ifdef INET6 + /* + * XXX: some software use embedded scope ids. + * We remove id from address and initialize sin6_scope_id + * instead. + */ + if (sa->sa_family == AF_INET6) + sa6_recoverscope((struct sockaddr_in6 *)sa); +#endif rtinfo->rti_info[i] = sa; cp += SA_SIZE(sa); }