47e6da5
From 676cf8a61ed240d0a86d471ef419f45ba35dba80 Mon Sep 17 00:00:00 2001
47e6da5
From: Denis Ovsienko <infrastation@yandex.ru>
47e6da5
Date: Thu, 5 Dec 2013 14:54:14 +0400
47e6da5
Subject: [PATCH] NFLOG: don't crash trying to filter at link layer
47e6da5
47e6da5
Before:
47e6da5
47e6da5
@ tcpdump -i nflog icmp
47e6da5
tcpdump: WARNING: SIOCGIFADDR: nflog: No such device
47e6da5
Aborted (core dumped)
47e6da5
47e6da5
After:
47e6da5
47e6da5
@ tcpdump -i nflog icmp
47e6da5
tcpdump: WARNING: SIOCGIFADDR: nflog: No such device
47e6da5
tcpdump: NFLOG link-layer type filtering not implemented
47e6da5
---
47e6da5
 gencode.c | 7 +++++++
47e6da5
 1 file changed, 7 insertions(+)
47e6da5
47e6da5
diff --git a/gencode.c b/gencode.c
47e6da5
index 7bb07fb..d58ea30 100644
47e6da5
--- a/gencode.c
47e6da5
+++ b/gencode.c
47e6da5
@@ -3410,6 +3410,13 @@ gen_linktype(proto)
47e6da5
 
47e6da5
 	case DLT_AX25_KISS:
47e6da5
 		bpf_error("AX.25 link-layer type filtering not implemented");
47e6da5
+
47e6da5
+	case DLT_NFLOG:
47e6da5
+		/* Using the fixed-size NFLOG header it is possible to tell only
47e6da5
+		 * the address family of the packet, other meaningful data is
47e6da5
+		 * either missing or behind TLVs.
47e6da5
+		 */
47e6da5
+		bpf_error("NFLOG link-layer type filtering not implemented");
47e6da5
 	}
47e6da5
 
47e6da5
 	/*
47e6da5
-- 
47e6da5
1.8.3.1
47e6da5