From: Amin Azez <azez@ufomechanic.net>
To: netfilter-devel@lists.netfilter.org
Cc: Harald Welte <laforge@netfilter.org>
Subject: PATCH Re: ipt_ulog.h versus ebt_ulog.h
Date: Wed, 19 Oct 2005 14:05:27 +0100 [thread overview]
Message-ID: <43564497.20009@ufomechanic.net> (raw)
In-Reply-To: <435614E6.1080200@ufomechanic.net>
[-- Attachment #1: Type: text/plain, Size: 501 bytes --]
Do we need an equivalent patch for ulog2?
ipt_ULOG was logging the bridge device instead of the physical devices
(for bridged packets at least).
This patch does it's best to cause logging of the physical devices
involved. I realise the patch is not going to be handled as it addresses
ulog1 but I should ask if the problem of not logging physical devices is
also a problem with ulog2.
Harald; also does it make sense with ulog2 to talk about merging
ebt_ulog_packet_msg and ulog_packet_msg?
Sam
[-- Attachment #2: ulog.physdev2.patch --]
[-- Type: text/x-patch, Size: 1017 bytes --]
--- ./net/ipv4/netfilter/ipt_ULOG.c.prephysdev 2005-10-19 10:46:52.000000000 +0100
+++ ./net/ipv4/netfilter/ipt_ULOG.c 2005-10-19 11:55:49.000000000 +0100
@@ -244,14 +244,26 @@
} else
pm->mac_len = 0;
- if (in)
- strncpy(pm->indev_name, in->name, sizeof(pm->indev_name));
- else
+ if (in) {
+#ifdef CONFIG_BRIDGE_NETFILTER
+ if (skb->nf_bridge)
+ strncpy(pm->indev_name, &(skb->nf_bridge->physindev->name), sizeof(pm->indev_name));
+ else if (skb->input_dev)
+ strncpy(pm->indev_name, &(skb->input_dev.name), sizeof(pm->indev_name));
+ else
+#endif
+ strncpy(pm->indev_name, in->name, sizeof(pm->indev_name));
+ } else
pm->indev_name[0] = '\0';
- if (out)
+ if (out) {
+#ifdef CONFIG_BRIDGE_NETFILTER
+ if (skb->nf_bridge)
+ strncpy(pm->outdev_name, &(skb->nf_bridge->physoutdev->name), sizeof(pm->outdev_name));
+ else
+#endif
strncpy(pm->outdev_name, out->name, sizeof(pm->outdev_name));
- else
+ } else
pm->outdev_name[0] = '\0';
/* copy_len <= skb->len, so can't fail. */
next prev parent reply other threads:[~2005-10-19 13:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-19 8:49 ipt_ulog.h versus ebt_ulog.h Amin Azez
2005-10-19 9:41 ` Amin Azez
2005-10-19 13:05 ` Amin Azez [this message]
2005-10-19 13:10 ` PATCH " Harald Welte
2005-10-21 12:42 ` Harald Welte
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=43564497.20009@ufomechanic.net \
--to=azez@ufomechanic.net \
--cc=laforge@netfilter.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.