From owner-freebsd-net@FreeBSD.ORG Thu Aug 7 10:24:36 2014 Return-Path: Delivered-To: freebsd-net@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 4399997F for ; Thu, 7 Aug 2014 10:24:36 +0000 (UTC) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.allbsd.org", Issuer "RapidSSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B6A9522A5 for ; Thu, 7 Aug 2014 10:24:35 +0000 (UTC) Received: from alph.d.allbsd.org ([IPv6:2001:2f0:104:e010:862b:2bff:febc:8956]) (authenticated bits=56) by mail.allbsd.org (8.14.9/8.14.8) with ESMTP id s77AOFrw025819 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 7 Aug 2014 19:24:25 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.d.allbsd.org (8.14.8/8.14.8) with ESMTP id s77AODGJ029865; Thu, 7 Aug 2014 19:24:14 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Thu, 07 Aug 2014 19:24:03 +0900 (JST) Message-Id: <20140807.192403.845244220459089560.hrs@allbsd.org> To: fernando@gont.com.ar Subject: Re: Routing IPv6 packets towards oneself with routing sockets? From: Hiroki Sato In-Reply-To: <53E2B586.3080700@gont.com.ar> References: <53E2B586.3080700@gont.com.ar> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.6 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Thu_Aug__7_19_24_03_2014_114)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (mail.allbsd.org [IPv6:2001:2f0:104:e001::32]); Thu, 07 Aug 2014 19:24:29 +0900 (JST) X-Spam-Status: No, score=-97.9 required=13.0 tests=CONTENT_TYPE_PRESENT, RDNS_NONE,SPF_SOFTFAIL,USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: freebsd-net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Aug 2014 10:24:36 -0000 ----Security_Multipart(Thu_Aug__7_19_24_03_2014_114)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, Fernando Gont wrote in <53E2B586.3080700@gont.com.ar>: fe> However, whenever I lookup an entry for fc00:1::1 with routing sockets, fe> the only entry I obtain is fc00:1::/64 (a network route) rather than fe> fc00:1::1/128 (a host route). As a result, I kind of have to figure out fe> that since fc00:1::1 is my own address, I must override whatever I fe> learned via routing sockets, and just send my packets to loopback. fe> fe> I would assume that I must be doing something wrong, since I would fe> expect the host-specific route (i.e. longest-matching route) to be route fe> learned via routing sockets. And that I shouldn't be implementing this fe> "is the dst address my own address?" hack. fe> fe> Any thoughts? fe> fe> P.S.: I can provide a code snippet if that'd be of any help. RTM_GET should return fc00:1::1/128 with ifp == lo0. Can you show the code you are using? -- Hiroki ----Security_Multipart(Thu_Aug__7_19_24_03_2014_114)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEABECAAYFAlPjU8MACgkQTyzT2CeTzy32FgCgqdd3V4Ap0oIXDly2EGDNJarS l4wAnjEF5rCAbRQv1mx5oSsMb4whzt+h =SWGN -----END PGP SIGNATURE----- ----Security_Multipart(Thu_Aug__7_19_24_03_2014_114)----