]> git.hungrycats.org Git - linux/commitdiff
[NETFILTER]: This patch fixes the ULOG target when logging packets without any
authorHarald Welte <laforge@gnumonks.org>
Thu, 9 Jan 2003 16:57:16 +0000 (08:57 -0800)
committerDavid S. Miller <davem@nuts.ninka.net>
Thu, 9 Jan 2003 16:57:16 +0000 (08:57 -0800)
ethernet header (mac address).

net/ipv4/netfilter/ipt_ULOG.c

index 7eee727271cdb47965965314872c9c8dcdf4d9da..109e45d17cdcbb8c40736e9b28582830cbd8ad25 100644 (file)
@@ -12,6 +12,7 @@
  *           module loadtime -HW
  * 2002/07/07 remove broken nflog_rcv() function -HW
  * 2002/08/29 fix shifted/unshifted nlgroup bug -HW
+ * 2002/10/30 fix uninitialized mac_len field - <Anders K. Pedersen>
  *
  * Released under the terms of the GPL
  *
@@ -31,7 +32,7 @@
  *   Specify, after how many clock ticks (intel: 100 per second) the queue
  * should be flushed even if it is not full yet.
  *
- * ipt_ULOG.c,v 1.21 2002/08/29 10:54:34 laforge Exp
+ * ipt_ULOG.c,v 1.22 2002/10/30 09:07:31 laforge Exp
  */
 
 #include <linux/module.h>
@@ -224,7 +225,8 @@ static unsigned int ipt_ulog_target(struct sk_buff **pskb,
            && 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));