From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Eric Leblond <eric@inl.fr>
Cc: netfilter-devel@vger.kernel.org, Patrick McHardy <kaber@trash.net>
Subject: Re: [ULOGD2 PATCH] Sync NFLOG input plugin with NFLOG modification related to hardware header.
Date: Mon, 21 Jul 2008 01:51:23 +0200 [thread overview]
Message-ID: <4883CF7B.9000105@netfilter.org> (raw)
In-Reply-To: <1216247506-21802-1-git-send-email-eric@inl.fr>
Eric Leblond wrote:
> This patch modifies ulogd2 to synchronize NFLOG with ULOG relatively to the
> definition of raw.mac. It fills the field with the complete hardware header
> instead of simply using the source hardware header.
>
> This is a preliminary work for an implementation of an hardware header parsing.
>
> Signed-off-by: Eric Leblond <eric@inl.fr>
> ---
> input/packet/ulogd_inppkt_NFLOG.c | 10 +++++-----
> 1 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/input/packet/ulogd_inppkt_NFLOG.c b/input/packet/ulogd_inppkt_NFLOG.c
> index cb58661..b69a99f 100644
> --- a/input/packet/ulogd_inppkt_NFLOG.c
> +++ b/input/packet/ulogd_inppkt_NFLOG.c
> @@ -290,9 +290,8 @@ static inline int
> interp_packet(struct ulogd_pluginstance *upi, struct nflog_data *ldata)
> {
> struct ulogd_key *ret = upi->output.keys;
> -
> +
> struct nfulnl_msg_packet_hdr *ph = nflog_get_msg_packet_hdr(ldata);
> - struct nfulnl_msg_packet_hw *hw = nflog_get_packet_hw(ldata);
> char *payload;
> int payload_len = nflog_get_payload(ldata, &payload);
> char *prefix = nflog_get_prefix(ldata);
> @@ -318,10 +317,11 @@ interp_packet(struct ulogd_pluginstance *upi, struct nflog_data *ldata)
> ret[NFLOG_KEY_OOB_PROTOCOL].flags |= ULOGD_RETF_VALID;
> }
>
> - if (hw) {
> - ret[NFLOG_KEY_RAW_MAC].u.value.ptr = hw->hw_addr;
> + if (nflog_get_msg_packet_hwhdrlen(ldata)) {
> + ret[NFLOG_KEY_RAW_MAC].u.value.ptr = nflog_get_msg_packet_hwhdr(ldata);
> ret[NFLOG_KEY_RAW_MAC].flags |= ULOGD_RETF_VALID;
> - ret[NFLOG_KEY_RAW_MAC_LEN].u.value.ui16 = ntohs(hw->hw_addrlen);
> + ret[NFLOG_KEY_RAW_MAC_LEN].u.value.ui16 =
> + nflog_get_msg_packet_hwhdrlen(ldata);
> ret[NFLOG_KEY_RAW_MAC_LEN].flags |= ULOGD_RETF_VALID;
OK, but we also need a key for the hw header type here to fix the
MAC2STR plugin - and probably rename it by ETHERNET2STR or HWADDR2STR if
we want to enable generic link layer header parsing.
Anyhow, the main problem is the database back-end. I think that we'll
have to log the whole hardware header again together with the hardware
type. But then, the MAC2STR plugin would not be useful for the database
output - still it may be for the plain text output.
--
"Los honestos son inadaptados sociales" -- Les Luthiers
next prev parent reply other threads:[~2008-07-20 23:51 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-19 12:23 [ULOGD PATCH 0/6] Fix difference between ULOG and NFLOG Eric Leblond
2008-06-19 12:23 ` [ULOGD PATCH 1/6] Suppress spaces at end of line Eric Leblond
2008-06-23 14:23 ` Pablo Neira Ayuso
2008-06-19 12:23 ` [ULOGD PATCH 2/6] Convert struct to [KEY] = {} format Eric Leblond
2008-06-23 14:23 ` Pablo Neira Ayuso
2008-06-19 12:23 ` [ULOGD PATCH 3/6] Fix warning about unused variable if NFLOG_GID is not available Eric Leblond
2008-06-23 14:25 ` Pablo Neira Ayuso
2008-06-27 19:41 ` Eric Leblond
2008-06-27 20:29 ` Eric Leblond
2008-06-28 9:54 ` Pablo Neira Ayuso
2008-06-28 10:25 ` Eric Leblond
2008-06-28 10:45 ` Pablo Neira Ayuso
2008-06-28 10:45 ` Pablo Neira Ayuso
2008-06-19 12:23 ` [ULOGD PATCH 4/6] Introduce datatype and hwaddrlen param to MAC2STR plugin Eric Leblond
2008-06-23 14:42 ` Pablo Neira Ayuso
2008-06-27 23:02 ` [ULOGD PATCH 0/6] rework mac address related issues Eric Leblond
2008-06-27 23:02 ` [ULOGD PATCH 1/6] Specify that NFLOG only return mac saddr Eric Leblond
2008-06-27 23:02 ` [ULOGD PATCH 2/6] Adapt MAC2STR to NFLOG and ULOG input key change Eric Leblond
2008-06-27 23:02 ` [ULOGD PATCH 3/6] Output mac.saddr and mac.daddr in ULOG plugin Eric Leblond
2008-07-02 13:52 ` [ULOGD PATCH] Output mac.saddr, mac.daddr and oob.protocol " Eric Leblond
2008-07-02 13:56 ` Patrick McHardy
2008-07-08 21:56 ` [ULOGD PATCH] rework, fill MAC address in ULOG for ethernet Eric Leblond
2008-07-09 10:50 ` Pablo Neira Ayuso
2008-07-09 10:53 ` Patrick McHardy
2008-07-09 11:03 ` Pablo Neira Ayuso
2008-07-09 11:10 ` Patrick McHardy
2008-07-09 21:04 ` Eric Leblond
2008-07-09 21:18 ` Patrick McHardy
2008-07-10 20:39 ` Eric Leblond
2008-07-11 14:08 ` Patrick McHardy
2008-07-15 12:49 ` Eric Leblond
2008-07-15 13:26 ` Patrick McHardy
2008-07-16 22:24 ` netfilter: Send complete hardware header in NFLOG Eric Leblond
2008-07-17 9:01 ` Patrick McHardy
2008-07-17 9:12 ` Eric Leblond
2008-07-17 9:14 ` Patrick McHardy
2008-07-16 22:29 ` [libnetfilter_log PATCH] Add parsing function for raw hardware header Eric Leblond
2008-07-17 9:13 ` Patrick McHardy
2008-07-16 22:31 ` [ULOGD2 PATCH] Sync NFLOG input plugin with NFLOG modification related to " Eric Leblond
2008-07-20 23:51 ` Pablo Neira Ayuso [this message]
2008-06-27 23:02 ` [ULOGD PATCH 4/6] Parse oob protocol in ULOG when possible Eric Leblond
2008-06-27 23:02 ` [ULOGD PATCH 5/6] Add destination mac_addr to database Eric Leblond
2008-06-27 23:03 ` [ULOGD PATCH 6/6] Sync PRINTPKT with mac modification Eric Leblond
2008-06-19 12:23 ` [ULOGD PATCH 5/6] Add destination mac_addr to database Eric Leblond
2008-06-23 14:44 ` Pablo Neira Ayuso
2008-06-19 12:23 ` [ULOGD PATCH 6/6] Suppress verbose debug message in ULOG Eric Leblond
2008-06-23 14:46 ` Pablo Neira Ayuso
2008-06-19 12:25 ` netfilter: Make NFLOG dump all hardware header Eric Leblond
2008-06-19 12:30 ` Patrick McHardy
2008-06-19 12:55 ` [PATCH] Change packet hw header struct accordingly to NFLOG update Eric Leblond
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=4883CF7B.9000105@netfilter.org \
--to=pablo@netfilter.org \
--cc=eric@inl.fr \
--cc=kaber@trash.net \
--cc=netfilter-devel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox