1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-13 10:02:38 +00:00

Hide IPv6 next header parsing warnings under the verbose sysctl

so people can possibly disable it when their consoles are flooded,
or enabled it for debugging.

MFC after:	2 weeks
Approved by:	re (kib)
This commit is contained in:
Bjoern A. Zeeb 2011-08-20 14:20:36 +00:00
parent 33ec9f0cb0
commit f76fdd221b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=225036

View File

@ -1023,9 +1023,11 @@ do { \
ext_hd |= EXT_RTHDR2;
break;
default:
printf("IPFW2: IPV6 - Unknown Routing "
"Header type(%d)\n",
((struct ip6_rthdr *)ulp)->ip6r_type);
if (V_fw_verbose)
printf("IPFW2: IPV6 - Unknown "
"Routing Header type(%d)\n",
((struct ip6_rthdr *)
ulp)->ip6r_type);
if (V_fw_deny_unknown_exthdrs)
return (IP_FW_DENY);
break;
@ -1047,8 +1049,9 @@ do { \
IP6F_MORE_FRAG;
if (V_fw_permit_single_frag6 == 0 &&
offset == 0 && ip6f_mf == 0) {
printf("IPFW2: IPV6 - Invalid Fragment "
"Header\n");
if (V_fw_verbose)
printf("IPFW2: IPV6 - Invalid "
"Fragment Header\n");
if (V_fw_deny_unknown_exthdrs)
return (IP_FW_DENY);
break;
@ -1119,8 +1122,10 @@ do { \
break;
default:
printf("IPFW2: IPV6 - Unknown Extension "
"Header(%d), ext_hd=%x\n", proto, ext_hd);
if (V_fw_verbose)
printf("IPFW2: IPV6 - Unknown "
"Extension Header(%d), ext_hd=%x\n",
proto, ext_hd);
if (V_fw_deny_unknown_exthdrs)
return (IP_FW_DENY);
PULLUP_TO(hlen, ulp, struct ip6_ext);