Date: Fri, 26 Oct 2012 11:34:42 +0300 From: Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua> To: freebsd-net@freebsd.org Subject: getnetent(3) return values for incorrect IPv4 network addresses Message-ID: <20121026083442.GA20882@pm513-1.comsys.ntu-kpi.kiev.ua>
next in thread | raw e-mail | index | archive | help
There is one feature of getnetent(3) that is not documented and is not checked by applications that use getnetent(3) or similar functions. If an IPv4 network address is specified incorrectly in the networks(5) database, then the n_net field from the struct netent{} is set to INADDR_NONE. This is done by the inet_network(3) function that is used for network address translation. Should this property of getnetent(3) be documented in its manual page to make such behaviour of getnetent(3) official? Example: % grep abc /etc/networks abc 1. % getent networks abc abc 255.255.255.255
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121026083442.GA20882>