From owner-freebsd-hackers@freebsd.org Mon Apr 26 13:50:20 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 672CF5E0F69 for ; Mon, 26 Apr 2021 13:50:20 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FTR9R3HpDz3PT0 for ; Mon, 26 Apr 2021 13:50:19 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 13QDoBkb097897; Mon, 26 Apr 2021 06:50:11 -0700 (PDT) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: (from freebsd-rwg@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 13QDoA0E097896; Mon, 26 Apr 2021 06:50:10 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <202104261350.13QDoA0E097896@gndrsh.dnsmgr.net> Subject: Re: Are there any RFCs for address selection for IPv4 In-Reply-To: <8834.1619373361@critter.freebsd.dk> To: Poul-Henning Kamp Date: Mon, 26 Apr 2021 06:50:10 -0700 (PDT) CC: Zhenlei Huang , "Rodney W. Grimes" , freebsd-hackers@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4FTR9R3HpDz3PT0 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd-rwg@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd-rwg@gndrsh.dnsmgr.net X-Spamd-Result: default: False [-0.60 / 15.00]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; SPAMHAUS_ZRD(0.00)[69.59.192.140:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[69.59.192.140:from]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; FREEMAIL_CC(0.00)[gmail.com,gndrsh.dnsmgr.net,freebsd.org]; MAILMAN_DEST(0.00)[freebsd-hackers]; SUSPICIOUS_RECIPS(1.50)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Apr 2021 13:50:20 -0000 > Zhenlei Huang writes: > > > Reading RFC 3927 2.7, it states link-local addresses are not routable. The router shall > > discard those packets from or to link-local addresses. Then it make no sense for a host > > to select link-local address as source address when it initialize a connection, except for > > an edge case that the destination is also link-local address. > > As I understand it, it only makes sense let the kernel select a LL address under two > conditions: I take it you mean for IPv4 only? > A) The destination is also LL *or* multicast Agree, this is pretty clear from specs. > > B) There is only one "UP" interfaces with an LLA. This I am not clear on. RFC 3927 does bring up some of the problems, and possible solutions, for a multihomed situation with LL addresses. Section 3.2 > > Implementing the second criteria runs into us putting a (IPv6)LL > on the loopback interface. Huh? We already do that. > > Does anybody know why we put a (ipv6)LL on loopback interfaces ? I believe someplace in the bowls of all the IPv6 specs this is a requirement. I could not find it quickly though. Question: Should we allow a route to have a next hop of a LL(ipv4)? Reason: RFC3927 2.6.2: The host MUST NOT send a packet with an IPv4 Link-Local destination address to any router for forwarding. So, arguably, it is a violation to allow the default route to have a LL next hop for ipv4. For that matter, it is a violation to allow ANY ipv4 LL address to be the next hop in the routing table(s). -- Rod Grimes rgrimes@freebsd.org