All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]: warn for icmp type 255
@ 2003-08-04 23:59 Patrick McHardy
  0 siblings, 0 replies; only message in thread
From: Patrick McHardy @ 2003-08-04 23:59 UTC (permalink / raw)
  To: Harald Welte; +Cc: Netfilter Development Mailinglist

[-- Attachment #1: Type: text/plain, Size: 211 bytes --]

This patch adds a warning if icmp-type 255 is given. Maybe we should fix 
this
right in 2.6 as long as it's still possible, even if that means having 
some #ifdefs
in the userspace code ?

Best regards,
Patrick

[-- Attachment #2: libipt_icmp-warn-icmp-0xff.diff --]
[-- Type: text/plain, Size: 804 bytes --]

Index: libipt_icmp.c
===================================================================
RCS file: /cvspublic/netfilter/userspace/extensions/libipt_icmp.c,v
retrieving revision 1.8
diff -u -r1.8 libipt_icmp.c
--- libipt_icmp.c	25 Feb 2003 10:50:59 -0000	1.8
+++ libipt_icmp.c	4 Aug 2003 23:49:00 -0000
@@ -77,7 +77,7 @@
 };
 
 static void
-print_icmptypes()
+print_icmptypes(void)
 {
 	unsigned int i;
 	printf("Valid ICMP Types:");
@@ -153,6 +153,9 @@
 		if (string_to_number(buffer, 0, 255, &number) == -1)
 			exit_error(PARAMETER_PROBLEM,
 				   "Invalid ICMP type `%s'\n", buffer);
+		if (number == 0xFF)
+			fprintf(stderr, "Warning: ICMP type 255 is used "
+					"internally and matches all types!\n");
 		*type = number;
 		if (slash) {
 			if (string_to_number(slash+1, 0, 255, &number) == -1)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-08-04 23:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-04 23:59 [PATCH]: warn for icmp type 255 Patrick McHardy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.