From owner-freebsd-net Mon Jan 6 18:12:16 2003 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 120F637B401 for ; Mon, 6 Jan 2003 18:12:15 -0800 (PST) Received: from alicia.nttmcl.com (alicia.nttmcl.com [216.69.69.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id ADA9B43ED4 for ; Mon, 6 Jan 2003 18:12:14 -0800 (PST) (envelope-from kelly@alicia.nttmcl.com) Received: from alicia.nttmcl.com (localhost [127.0.0.1]) by alicia.nttmcl.com (8.12.5/8.12.5) with ESMTP id h072C9vm087314 for ; Mon, 6 Jan 2003 18:12:09 -0800 (PST) (envelope-from kelly@alicia.nttmcl.com) Received: from localhost (kelly@localhost) by alicia.nttmcl.com (8.12.5/8.12.5/Submit) with ESMTP id h072C9be087311 for ; Mon, 6 Jan 2003 18:12:09 -0800 (PST) Date: Mon, 6 Jan 2003 18:12:09 -0800 (PST) From: Kelly Yancey To: freebsd-net@FreeBSD.org Subject: Radix nodes, netmasks, and bogus sockaddrs, oh my! Message-ID: <20030106174323.H86820-100000@alicia.nttmcl.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Is there any reason to fix the code in the kernel which assumes rt_mask(rt) is a properly-formed sockaddr? For example, sys/net/rtsock.c:sysctl_dumpentry() just passes rt_mask(rt)'s contents to userland to be interpretted as a sockaddr but it seldomly is a properly-formed sockaddr (i.e. sa_family is almost always garbage and sa_len is 0 for the default route). Nothing in the base system appears to care that the netmask isn't a full-fledged sockaddr so it isn't hurting anything. The main reason I ask is that interfaces such as sysctl_rtable and routing sockets are currently making stronger claims then they are living up to and I would be inclined to fix it. But if it were to be fixed, is there a preference for whether it should be corrected in the routing table itself or just when the information is exported? Thanks, Kelly To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message