From owner-cvs-all Sat Apr 21 13: 6:24 2001 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id A229137B422; Sat, 21 Apr 2001 13:06:19 -0700 (PDT) (envelope-from iedowse@FreeBSD.org) Received: (from iedowse@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f3LK6J777427; Sat, 21 Apr 2001 13:06:19 -0700 (PDT) (envelope-from iedowse) Message-Id: <200104212006.f3LK6J777427@freefall.freebsd.org> From: Ian Dowse Date: Sat, 21 Apr 2001 13:06:19 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sbin/mountd mountd.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG iedowse 2001/04/21 13:06:19 PDT Modified files: sbin/mountd mountd.c Log: The introduction of IPv6 support from NetBSD's mountd invalidated a number of assumptions related to the parsing of options in /etc/exports, and missed a few necessary new error checks. The main problems related to netmasks: an IPv6 network address missing a netmask would result in the filesystem being exported to the whole IPv6 world, non-continuous netmasks would be made continuous without any warnings, and nothing prevented you specifying an IPv4 mask with an IPv6 address. This change addresses these issues. As a side-effect we now store netmasks in sockaddr structs (this matches the kernel interface, and is closer to the way it used to be). Add a flag OP_HAVEMASK to keep track of whether or not we have successfully got a mask from any source. Replace some mask-related helper functions with versions that use the sockaddr-based masks. Also tidy up get_net() and fix the code that interprets IPv4 partial networks such as "127.1" as network rather than host addresses. Properly zero out some structures that were ending up partially containing junk from the stack, fix a few formatting issues, and add a comment noting some assumptions about export arguments. Revision Changes Path 1.48 +210 -246 src/sbin/mountd/mountd.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message