summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Eitzenberger <heitzenberger@astaro.com>2009-10-20 12:20:48 +0200
committerHarald Welte <laforge@gnumonks.org>2010-10-21 19:15:38 +0200
commit7fdfe0e604d3924cb5693d15b32d050c4d1b7432 (patch)
tree2d6d38b7c0205eaf61cf6cb0bdd573eb7f57be5e
parent72e7d53f97aa42547da136d3a141c627f1833d40 (diff)
NFLOG: only write non zero lladdr
Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
-rw-r--r--input/packet/ulogd_inppkt_NFLOG.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/input/packet/ulogd_inppkt_NFLOG.c b/input/packet/ulogd_inppkt_NFLOG.c
index b68bb82..4b01b1b 100644
--- a/input/packet/ulogd_inppkt_NFLOG.c
+++ b/input/packet/ulogd_inppkt_NFLOG.c
@@ -177,8 +177,11 @@ nflog_handle_msg(struct nl_object *obj, void *arg)
key_set_u8(&out[K_OOB_FAMILY], nfnl_log_get_family(nflog_obj));
BUG_ON(!key_u8(&out[K_OOB_FAMILY]));
- key_set_ptr(&out[K_RAW_MAC], (void*)nfnl_log_get_hwaddr(nflog_obj, &len));
- key_set_u16(&out[K_RAW_MAC_LEN], len);
+ if (nfnl_log_get_hwaddr(nflog_obj, &len)) {
+ key_set_ptr(&out[K_RAW_MAC], (void *)nfnl_log_get_hwaddr(nflog_obj,
+ &len));
+ key_set_u16(&out[K_RAW_MAC_LEN], len);
+ }
key_set_ptr(&out[K_RAW_PKT], (void*)nfnl_log_get_payload(nflog_obj, &len));
key_set_u32(&out[K_RAW_PKTLEN], len);