From: Patrick McHardy <kaber@trash.net>
To: davem@davemloft.net
Cc: netfilter-devel@lists.netfilter.org, Patrick McHardy <kaber@trash.net>
Subject: [NETFILTER 04/05]: nf_conntrack: attach conntrack to locally generated ICMPv6 error
Date: Thu, 16 Feb 2006 00:00:32 +0100 (MET) [thread overview]
Message-ID: <20060215230032.25078.64555.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20060215230026.25078.33875.sendpatchset@localhost.localdomain>
[NETFILTER]: nf_conntrack: attach conntrack to locally generated ICMPv6 error
Locally generated ICMPv6 errors should be associated with the conntrack
of the original packet. Since the conntrack entry may not be in the hash
tables (for the first packet), it must be manually attached.
Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
commit a01ef7ba3866e0c920f804f153166f162bcb2a1f
tree 8a164639758c51e7f41453ed1736a49e0456becc
parent 257b70114334c5cee6f8b1f4789f49cc570fac45
author Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> Wed, 15 Feb 2006 11:08:54 +0100
committer Patrick McHardy <kaber@trash.net> Wed, 15 Feb 2006 11:08:54 +0100
net/ipv6/icmp.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index fcf8831..21eb725 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -42,6 +42,7 @@
#include <linux/net.h>
#include <linux/skbuff.h>
#include <linux/init.h>
+#include <linux/netfilter.h>
#ifdef CONFIG_SYSCTL
#include <linux/sysctl.h>
@@ -255,6 +256,7 @@ out:
struct icmpv6_msg {
struct sk_buff *skb;
int offset;
+ uint8_t type;
};
static int icmpv6_getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb)
@@ -266,6 +268,8 @@ static int icmpv6_getfrag(void *from, ch
csum = skb_copy_and_csum_bits(org_skb, msg->offset + offset,
to, len, csum);
skb->csum = csum_block_add(skb->csum, csum, odd);
+ if (!(msg->type & ICMPV6_INFOMSG_MASK))
+ nf_ct_attach(skb, org_skb);
return 0;
}
@@ -403,6 +407,7 @@ void icmpv6_send(struct sk_buff *skb, in
msg.skb = skb;
msg.offset = skb->nh.raw - skb->data;
+ msg.type = type;
len = skb->len - msg.offset;
len = min_t(unsigned int, len, IPV6_MIN_MTU - sizeof(struct ipv6hdr) -sizeof(struct icmp6hdr));
@@ -500,6 +505,7 @@ static void icmpv6_echo_reply(struct sk_
msg.skb = skb;
msg.offset = 0;
+ msg.type = ICMPV6_ECHO_REPLY;
err = ip6_append_data(sk, icmpv6_getfrag, &msg, skb->len + sizeof(struct icmp6hdr),
sizeof(struct icmp6hdr), hlimit, tclass, NULL, &fl,
next prev parent reply other threads:[~2006-02-15 23:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-15 23:00 [00/05]: Netfilter fixes for 2.6.16 Patrick McHardy
2006-02-15 23:00 ` [NETFILTER 01/05]: x_tables: fix dependencies of conntrack related modules Patrick McHardy
2006-02-15 23:21 ` David S. Miller
2006-02-15 23:00 ` [NETFILTER 02/05]: nf_conntrack: move registration of __nf_ct_attach Patrick McHardy
2006-02-15 23:22 ` David S. Miller
2006-02-15 23:00 ` [NETFILTER 03/05]: nf_conntrack: attach conntrack to TCP RST generated by ip6t_REJECT Patrick McHardy
2006-02-15 23:23 ` David S. Miller
2006-02-15 23:38 ` Patrick McHardy
2006-02-15 23:00 ` Patrick McHardy [this message]
2006-02-15 23:24 ` [NETFILTER 04/05]: nf_conntrack: attach conntrack to locally generated ICMPv6 error David S. Miller
2006-02-15 23:00 ` [NETFILTER 05/05]: nf_conntrack: Fix TCP/UDP HW checksum handling for IPv6 packet Patrick McHardy
2006-02-15 23:25 ` David S. Miller
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=20060215230032.25078.64555.sendpatchset@localhost.localdomain \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--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.