From: Phil Dibowitz <phil@ipom.com>
To: netfilter-devel@lists.netfilter.org
Subject: [PATCH] Fix icmp_id setter and doc
Date: Fri, 16 Mar 2007 12:15:05 -0700 [thread overview]
Message-ID: <20070316191505.GB26826@ipom.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 645 bytes --]
ICMP ID is stored as a u_int16_t, but its setter function derefs it's
arguement as a u_int8_t. Additionally the api "doc" claims it's a u8, when
it's not.
This patch fixes both.
--
Phil Dibowitz phil@ipom.com
Open Source software and tech docs Insanity Palace of Metallica
http://www.phildev.net/ http://www.ipom.com/
"Never write it in C if you can do it in 'awk';
Never do it in 'awk' if 'sed' can handle it;
Never use 'sed' when 'tr' can do the job;
Never invoke 'tr' when 'cat' is sufficient;
Avoid using 'cat' whenever possible" -- Taylor's Laws of Programming
[-- Attachment #1.2: libnetfilter_conntrack-0.0.50_icmp_id.patch --]
[-- Type: text/x-diff, Size: 1086 bytes --]
--- libnetfilter_conntrack-0.0.50/include/libnetfilter_conntrack/libnetfilter_conntrack.h.orig 2007-03-16 12:07:40.000000000 -0700
+++ libnetfilter_conntrack-0.0.50/include/libnetfilter_conntrack/libnetfilter_conntrack.h 2007-03-16 12:08:25.000000000 -0700
@@ -359,7 +359,7 @@
ATTR_REPL_PORT_DST, /* u16 bits */
ATTR_ICMP_TYPE = 12, /* u8 bits */
ATTR_ICMP_CODE, /* u8 bits */
- ATTR_ICMP_ID, /* u8 bits */
+ ATTR_ICMP_ID, /* u16 bits */
ATTR_ORIG_L3PROTO, /* u8 bits */
ATTR_REPL_L3PROTO = 16, /* u8 bits */
ATTR_ORIG_L4PROTO, /* u8 bits */
--- libnetfilter_conntrack-0.0.50/src/conntrack/setter.c.orig 2007-03-16 12:08:52.000000000 -0700
+++ libnetfilter_conntrack-0.0.50/src/conntrack/setter.c 2007-03-16 12:09:00.000000000 -0700
@@ -79,7 +79,7 @@
static void set_attr_icmp_id(struct nf_conntrack *ct, const void *value)
{
- ct->tuple[__DIR_ORIG].l4src.icmp.id = *((u_int8_t *) value);
+ ct->tuple[__DIR_ORIG].l4src.icmp.id = *((u_int16_t *) value);
}
static void set_attr_orig_l3proto(struct nf_conntrack *ct, const void *value)
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next reply other threads:[~2007-03-16 19:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-16 19:15 Phil Dibowitz [this message]
2007-03-17 10:58 ` [PATCH] Fix icmp_id setter and doc Patrick McHardy
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=20070316191505.GB26826@ipom.com \
--to=phil@ipom.com \
--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.