Date: Tue, 20 Nov 2007 23:17:43 +0900 From: JINMEI Tatuya / =?ISO-2022-JP?B?GyRCP0BMQEMjOkgbKEI=?= <jinmei@isl.rdc.toshiba.co.jp> To: freebsd-net@freebsd.org Subject: a format error in pf_print_host() Message-ID: <m2ejelypa0.wl%jinmei@isl.rdc.toshiba.co.jp>
next in thread | raw e-mail | index | archive | help
--Multipart_Tue_Nov_20_23:17:43_2007-1 Content-Type: text/plain; charset=US-ASCII (This should probably be reported to an OpenBSD forum, but I'm not subscribing to any of the lists, so I'm posting this to freebsd-net. I believe pf maintainers watch this list, too...) I've found a minor error in pf_print_host() which is revealed for some time of IPv6 addresses. This routine always (perhaps unintentionally) assumes abbreviate-able consecutive zero's, so, for example, it formats "1:2:3:4:5:6:7:8" as ":2:3:4:5:6:7:8". This can be confirmed by the sample code attached to this message by - saving the file as e.g. "foo.c" - cc -o foo foo.c - ./foo 1:2:3:4:5:6:7:8 I've also attached a proposed patch to this problem. The diff was made against 6-STABLE, but it's probably applicable to other versions. JINMEI, Tatuya Communication Platform Lab. Corporate R&D Center, Toshiba Corp. jinmei@isl.rdc.toshiba.co.jp --Multipart_Tue_Nov_20_23:17:43_2007-1--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m2ejelypa0.wl%jinmei>