diff -urN ip_fil3.4.32/ip_fil.h ip_fil3.4.32+label/ip_fil.h
--- ip_fil3.4.32/ip_fil.h	Sat Jun  7 14:56:02 2003
+++ ip_fil3.4.32+label/ip_fil.h	Fri Jul  4 13:15:01 2003
@@ -248,6 +248,7 @@
 	char	fr_ifnames[4][LIFNAMSIZ];
 	struct	frdest	fr_tif;	/* "to" interface */
 	struct	frdest	fr_dif;	/* duplicate packet interfaces */
+	u_32_t	fr_label;	/* a non-unique ID to be used by user-space programs */
 	u_int	fr_cksum;	/* checksum on filter rules for performance */
 } frentry_t;
 
diff -urN ip_fil3.4.32/man/ipf.5 ip_fil3.4.32+label/man/ipf.5
--- ip_fil3.4.32/man/ipf.5	Mon Mar 31 14:52:33 2003
+++ ip_fil3.4.32+label/man/ipf.5	Fri Jul  4 13:15:01 2003
@@ -19,7 +19,7 @@
 \fC
 .nf
 filter-rule = [ insert ] action in-out [ options ] [ tos ] [ ttl ]
-	      [ proto ] [ ip ] [ group ].
+	      [ proto ] [ ip ] [ group ] [ label ].
 
 insert	= "@" decnumber .
 action	= block | "pass" | log | "count" | skip | auth | call .
@@ -30,6 +30,7 @@
 proto	= "proto" protocol .
 ip	= srcdst [ flags ] [ with withopt ] [ icmp ] [ keep ] .
 group	= [ "head" decnumber ] [ "group" decnumber ] .
+label	= "label" decnumber .
 
 block	= "block" [ return-icmp[return-code] | "return-rst" ] .
 auth    = "auth" | "preauth" .
@@ -246,6 +247,11 @@
 construct a firewall that behaves transparently, like a filtering hub
 or switch, rather than a router. The \fBfastroute\fP keyword is a
 synonym for this option.
+.TP
+.B "label <n>"
+pins a (non-unique) label on a rule (default is 0). This has no impact
+on processing of the rules but can be used by a companion program to
+distinguish between rules or a group of rules.
 .SH MATCHING PARAMETERS
 .PP 
 The keywords described in this section are used to describe attributes
diff -urN ip_fil3.4.32/parse.c ip_fil3.4.32+label/parse.c
--- ip_fil3.4.32/parse.c	Wed Jun 25 22:09:35 2003
+++ ip_fil3.4.32+label/parse.c	Fri Jul  4 13:20:39 2003
@@ -722,6 +722,27 @@
 	}
 
 	/*
+	 * has a label ?
+	 */
+	if (*cpp && !strcasecmp(*cpp, "label")) {
+		if (!*++cpp) {
+			fprintf(stderr, "%d: label without label #\n",
+				linenum);
+			*status = -1;
+			return NULL;
+		}
+		if (ratoui(*cpp, &k, 0, UINT_MAX))
+			fil.fr_label = k;
+		else {
+			fprintf(stderr, "%d: invalid label (%s)\n",
+				linenum, *cpp);
+			*status = -1;
+			return NULL;
+		}
+		cpp++;
+	}
+
+	/*
 	 * leftovers...yuck
 	 */
 	if (*cpp && **cpp) {
@@ -1457,6 +1478,8 @@
 		printf(" head %d", fp->fr_grhead);
 	if (fp->fr_group)
 		printf(" group %d", fp->fr_group);
+	if (fp->fr_label)
+		printf(" label %d", fp->fr_label);
 	(void)putchar('\n');
 }
 
