NetBSD Problem Report #29790
From cross@distal.com Fri Mar 25 06:57:36 2005
Return-Path: <cross@distal.com>
Received: from harmony.distal.com (pcp04365944pcs.nrockv01.md.comcast.net [69.140.200.59])
by narn.netbsd.org (Postfix) with ESMTP id A9B8D63B116
for <gnats-bugs@gnats.NetBSD.org>; Fri, 25 Mar 2005 06:57:35 +0000 (UTC)
Message-Id: <200503250656.j2P6uIue001372@borderguard.distal.com>
Date: Fri, 25 Mar 2005 01:56:18 -0500 (EST)
From: Chris Ross <cross+netbsd@distal.com>
Reply-To: Chris Ross <cross+netbsd@distal.com>
To: gnats-bugs@netbsd.org
Subject: POINTTOPOINT IPv6 prefixlen inconsistency
X-Send-Pr-Version: 3.95
>Number: 29790
>Category: kern
>Synopsis: P2P interfaces act differently w.r.t. mask (IPv4 vs. IPv6)
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Mar 25 06:58:00 +0000 2005
>Originator: Chris Ross
>Release: NetBSD 2.0.2
>Organization:
>Environment:
System: NetBSD borderguard.distal.com 2.0.2 NetBSD 2.0.2 (ROUTER.MP) #0: Fri Mar 25 00:35:52 EST 2005 cross@skaro.distal.com:/data/obj/NetBSD-2.0.2.i386/data/NetBSD-2.0/src-2.0.2/sys/arch/i386/compile/ROUTER.MP i386
Architecture: i386
Machine: i386
>Description:
The kernel acts differently w.r.t. mask length of addresses applied
to P2P interfaces, depending on the IP version of the address. It appears
to require a "prefixlen 128" for IPv6 addresses, but is content to allow
other things (e.g. /30) for IPv4 addresses.
>How-To-Repeat:
Create a gre interface, set the tunnel endpoints, then:
# ifconfig gre0 inet A.B.C.D/30 A.B.C.(D+1)
...this will work. But, if you create a gif interface,
set its tunnel endpoints, and try:
# ifconfig gif0 inet6 2001:23:2354::2:1/112 2001:23:2354::2:2
ifconfig: SIOCAIFADDR: Invalid argument
#
It will do the same thing if I move the 112 into a "prefixlen"
argument. Any prefixlen smaller than 128 causes this.
Despite the error message, this is actually from the handling
of SIOCAIFADDR_IN6 in sys/netinet6/in6.c. ifconfig is confusing about
this because it always reports SIOCAIFADDR, regardless of which family
it's using.
>Fix:
Figure out why IPv4 p2p interfaces allow the netmask to be set
to something other than /32. Assuming this is a sensible reason,
adjust the code in netinet6/in6.c to allow the same for IPv6.
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.