All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Harald Welte <laforge@gnumonks.org>
Cc: Netfilter Development Mailinglist <netfilter-devel@lists.netfilter.org>
Subject: [PATCH]: warn for icmp type 255
Date: Tue, 05 Aug 2003 01:59:49 +0200	[thread overview]
Message-ID: <3F2EF375.407@trash.net> (raw)

[-- 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)

                 reply	other threads:[~2003-08-04 23:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F2EF375.407@trash.net \
    --to=kaber@trash.net \
    --cc=laforge@gnumonks.org \
    --cc=netfilter-devel@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.