The following patch modifies NFLOG to return a key raw.mac.saddr as NFLOG kernel module only returns this field. Signed-off-by: Eric Leblond <eric@xxxxxx> --- 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 728b410..f239e42 100644 --- a/input/packet/ulogd_inppkt_NFLOG.c +++ b/input/packet/ulogd_inppkt_NFLOG.c @@ -114,7 +114,7 @@ static struct config_keyset libulog_kset = { #define nlsockbufmaxsize_ce(x) (x->ces[9]) enum nflog_keys { - NFLOG_KEY_RAW_MAC = 0, + NFLOG_KEY_RAW_MAC_SADDR = 0, NFLOG_KEY_RAW_PCKT, NFLOG_KEY_RAW_PCKTLEN, NFLOG_KEY_RAW_PCKTCOUNT, @@ -136,10 +136,10 @@ enum nflog_keys { }; static struct ulogd_key output_keys[] = { - [NFLOG_KEY_RAW_MAC] = { + [NFLOG_KEY_RAW_MAC_SADDR] = { .type = ULOGD_RET_RAW, .flags = ULOGD_RETF_NONE, - .name = "raw.mac", + .name = "raw.mac.saddr", .ipfix = { .vendor = IPFIX_VENDOR_IETF, .field_id = IPFIX_sourceMacAddress, @@ -319,8 +319,8 @@ interp_packet(struct ulogd_pluginstance *upi, struct nflog_data *ldata) } if (hw) { - ret[NFLOG_KEY_RAW_MAC].u.value.ptr = hw->hw_addr; - ret[NFLOG_KEY_RAW_MAC].flags |= ULOGD_RETF_VALID; + ret[NFLOG_KEY_RAW_MAC_SADDR].u.value.ptr = hw->hw_addr; + ret[NFLOG_KEY_RAW_MAC_SADDR].flags |= ULOGD_RETF_VALID; ret[NFLOG_KEY_RAW_MAC_LEN].u.value.ui16 = ntohs(hw->hw_addrlen); ret[NFLOG_KEY_RAW_MAC_LEN].flags |= ULOGD_RETF_VALID; } -- 1.5.4.3 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html