Date: Thu, 9 Sep 2010 06:43:18 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sys/netinet ip_input.c ip_var.h src/sys/netinet6 ip6_input.c ip6_var.h Message-ID: <201009090643.o896hiKQ021337@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
bz 2010-09-09 06:43:18 UTC FreeBSD src repository Modified files: (Branch: RELENG_8) sys/netinet ip_input.c ip_var.h sys/netinet6 ip6_input.c ip6_var.h Log: SVN rev 212351 on 2010-09-09 06:43:18Z by bz MFC r212155: MFp4 CH=183052 183053 183258: In protosw we define pr_protocol as short, while on the wire it is an uint8_t. That way we can have "internal" protocols like DIVERT, SEND or gaps for modules (PROTO_SPACER). Switch ipproto_{un,}register to accept a short protocol number(*) and do an upfront check for valid boundries. With this we also consistently report EPROTONOSUPPORT for out of bounds protocols, as we did for proto == 0. This allows a caller to not error for this case, which is especially important if we want to automatically call these from domain handling. (*) the functions have been without any in-tree consumer since the initial introducation, so this is considered save. Implement ip6proto_{un,}register() similarly to their legacy IP counter parts to allow modules to hook up dynamically. Reviewed by: philip, will Revision Changes Path 1.375.2.10 +6 -10 src/sys/netinet/ip_input.c 1.115.2.6 +2 -2 src/sys/netinet/ip_var.h 1.132.2.6 +58 -0 src/sys/netinet6/ip6_input.c 1.55.2.4 +3 -0 src/sys/netinet6/ip6_var.h
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009090643.o896hiKQ021337>