Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Aug 2008 01:03:46 +0400
From:      Roman Kurakin <rik@inse.ru>
To:        freebsd-net@freebsd.org
Subject:   IPFW PATCH: make the IPFW_DEFUALT_RULE number constant non private
Message-ID:  <48B07B32.4040008@localhost.inse.ru>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------060005050808040906070906
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

The IPFW_DEFAULT_RULE is also the max allowed rule number.
This value should be definitely public, so here is the patch, if there is
no objections I'll commit it within a couple of days.
After that, I plan to fix a couple of tools that need to know this value.

Best regards,

rik


--------------060005050808040906070906
Content-Type: text/plain;
 name="patch_fbsd_2"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="patch_fbsd_2"

Index: ip_fw.h
===================================================================
--- ip_fw.h	(revision 182080)
+++ ip_fw.h	(working copy)
@@ -29,6 +29,11 @@
 #define _IPFW2_H
 
 /*
+ * The default rule number.  It is also the max possible rule number.
+ */
+#define	IPFW_DEFAULT_RULE	65535
+
+/*
  * The kernel representation of ipfw rules is made of a list of
  * 'instructions' (for all practical purposes equivalent to BPF
  * instructions), which specify which fields of the packet
Index: ip_fw2.c
===================================================================
--- ip_fw2.c	(revision 182080)
+++ ip_fw2.c	(working copy)
@@ -122,7 +122,6 @@
 
 static struct callout ipfw_timeout;
 static uma_zone_t ipfw_dyn_rule_zone;
-#define	IPFW_DEFAULT_RULE	65535
 
 /*
  * Data structure to cache our ucred related

--------------060005050808040906070906--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48B07B32.4040008>