summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authoralex <alex@FreeBSD.org>1997-08-08 14:36:29 +0000
committeralex <alex@FreeBSD.org>1997-08-08 14:36:29 +0000
commitdc3ab858903e9fc74c4e541e16641a227d47cab7 (patch)
tree2066b4cf8d5ecb1b5b1299827858274c8dd48a20 /sbin
parent589d243b0950108d54f474d4143448c60c5cc065 (diff)
downloadFreeBSD-src-dc3ab858903e9fc74c4e541e16641a227d47cab7.zip
FreeBSD-src-dc3ab858903e9fc74c4e541e16641a227d47cab7.tar.gz
Support interface names up to 15 characters in length. In order to
accommodate the expanded name, the ICMP types bitmap has been reduced from 256 bits to 32. A recompile of kernel and user level ipfw is required. To be merged into 2.2 after a brief period in -current. PR: bin/4209 Reviewed by: Archie Cobbs <archie@whistle.com>
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ipfw/ipfw.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/ipfw/ipfw.c b/sbin/ipfw/ipfw.c
index 802e5c6..fb4f577 100644
--- a/sbin/ipfw/ipfw.c
+++ b/sbin/ipfw/ipfw.c
@@ -16,7 +16,7 @@
*
* NEW command line interface for IP firewall facility
*
- * $Id: ipfw.c,v 1.45 1997/06/23 22:32:13 julian Exp $
+ * $Id: ipfw.c,v 1.46 1997/07/25 03:13:46 brian Exp $
*
*/
@@ -384,7 +384,7 @@ show_ipfw(struct ip_fw *chain)
printf(" icmptype");
- for (type_index = 0; type_index < 256; ++type_index)
+ for (type_index = 0; type_index < IP_FW_ICMPTYPES_DIM * sizeof(unsigned) * 8; ++type_index)
if (chain->fw_icmptypes[type_index / (sizeof(unsigned) * 8)] &
(1U << (type_index % (sizeof(unsigned) * 8)))) {
printf("%c%d", first == 1 ? ' ' : ',', type_index);
@@ -697,8 +697,8 @@ fill_icmptypes(types, vp, fw_flg)
if ( *c != ',' && *c != '\0' )
show_usage("invalid ICMP type");
- if (icmptype > 255)
- show_usage("ICMP types are between 0 and 255 inclusive");
+ if (icmptype >= IP_FW_ICMPTYPES_DIM * sizeof(unsigned) * 8)
+ show_usage("ICMP type out of range");
types[icmptype / (sizeof(unsigned) * 8)] |=
1 << (icmptype % (sizeof(unsigned) * 8));
OpenPOWER on IntegriCloud