From: Bart <b-m@pandora.be>
To: netfilter-devel@lists.netfilter.org
Subject: Re: mac_len uninitialized in ipt_ULOG.c
Date: Mon, 28 Oct 2002 16:49:36 +0100 [thread overview]
Message-ID: <3DBD5C90.70704@pandora.be> (raw)
In-Reply-To: 3DBC5F7D.3FC31A48@cohaesio.com
[-- Attachment #1: Type: text/plain, Size: 2220 bytes --]
Great !
I have been noticing this strange mac-output by ulog.
Gonna try your solution...
greetz
"Anders K. Pedersen"@harrier.cohaesio.com wrote:
>Hello,
>
>I recently startet using the ulogd daemon to log traffic from a PPPoE
>interface (have used it on regular ethernet interfaces for long). In the
>resulting logs, the MAC address was filled with (what seemed to be)
>garbage like the following entry:
>
>Oct 13 21:15:09 gw INPUT: IN=ppp0 OUT=
>MAC=6b:21:c0:00:00:00:00:11:00:00:00:00:00:00:00:00:00:00:00:01:00:00:00:00:00:00:00:63:26:00:00:00:00:00:00:02:26:00:00:7d:26:00:00:00:00:00:00:00:80:8e:c6:00:80:8e:c6:00:00:00:00:00:00:00:00:00:00:00:00:a8:60:76:c1:a8:60:76:c1:00:00:00:00:0c:45:00:00:4e:75:63:00:00:72:11:5e:4f:c1:f9:05:05:50:3f:5d:af:04:01:00:89:00:3a:46:ba:01:00:00:10:00:01:00:00:00:00:00:00:20:43:4b:41:41:41:41:41:41:41:41:41:41:41:41:41:41:41:41:41:41:41:41:41:41:41:41:41:41:41:41:41:41:00:00:21:00:01:00:2c:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
>SRC=vvv.xxx.yyy.zzz 249.5.5 DST=aaa.bbb.ccc.ddd LEN=78 TOS=00 PREC=0x00
>TTL=114 ID=30051 PROTO=UDP SPT=1025 DPT=137 LEN=58
>
>When using the regular LOG target, the MAC field was empty. I traced
>this back to the ipt_ulog_target function in
>net/ipv4/netfilter/ipt_ULOG.c in the kernel, where pm->mac_len in the
>ulog_packet_msg_t struct is left uninitialized, when there is no MAC
>address.
>
>The attached patch fixes this. It is made against 2.4.19, and I have
>verified, that it applies to 2.4.20-pre11 as well as the latest
>patch-o-matic patches from CVS.
>
>Regards,
>Anders K. Pedersen
>
>------------------------------------------------------------------------
>
>--- linux-2.4.19/net/ipv4/netfilter/ipt_ULOG.c.orig Sun Oct 13 22:01:55 2002
>+++ linux-2.4.19/net/ipv4/netfilter/ipt_ULOG.c Sun Oct 13 22:01:55 2002
>@@ -223,7 +223,8 @@
> && in->hard_header_len <= ULOG_MAC_LEN) {
> memcpy(pm->mac, (*pskb)->mac.raw, in->hard_header_len);
> pm->mac_len = in->hard_header_len;
>- }
>+ } else
>+ pm->mac_len = 0;
>
> if (in)
> strncpy(pm->indev_name, in->name, sizeof(pm->indev_name));
>
>
[-- Attachment #2: Type: text/html, Size: 2467 bytes --]
next prev parent reply other threads:[~2002-10-28 15:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-27 21:49 mac_len uninitialized in ipt_ULOG.c Anders K. Pedersen, mailnews+linux-netfilter-devel
2002-10-28 15:49 ` Bart [this message]
2002-10-30 8:59 ` 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=3DBD5C90.70704@pandora.be \
--to=b-m@pandora.be \
--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.