summaryrefslogtreecommitdiffstats
path: root/libxtables/getethertype.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2018-10-19 13:06:53 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2018-10-20 11:14:15 +0200
commitabae556c886d94751128c0deb0feee9589fda4c3 (patch)
treef7fbcd9dcfa24ef80734d593ee80b847684e07b2 /libxtables/getethertype.c
parentc2d9ed99316f26de2d57d9798eee50034114540b (diff)
libxtables: expose new etherdb lookup function through libxtables API
This is used from extensions and included in libxtables, so we have to make them public. Fixes: 31f1434dfe37 ("libxtables: Integrate getethertype.c from xtables core") Reported-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Acked-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'libxtables/getethertype.c')
-rw-r--r--libxtables/getethertype.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libxtables/getethertype.c b/libxtables/getethertype.c
index a4c1407c..59949b79 100644
--- a/libxtables/getethertype.c
+++ b/libxtables/getethertype.c
@@ -42,8 +42,7 @@
#include <string.h>
#include <netinet/ether.h>
#include <net/ethernet.h>
-
-#include <ebtables/ethernetdb.h>
+#include <xtables.h>
#define MAXALIASES 35
@@ -56,7 +55,7 @@ static int ethertype_stayopen;
static void setethertypeent(int f)
{
if (etherf == NULL)
- etherf = fopen(_XT_PATH_ETHERTYPES, "r");
+ etherf = fopen(XT_PATH_ETHERTYPES, "r");
else
rewind(etherf);
ethertype_stayopen |= f;
@@ -79,7 +78,7 @@ static struct xt_ethertypeent *getethertypeent(void)
register char *cp, **q;
if (etherf == NULL
- && (etherf = fopen(_XT_PATH_ETHERTYPES, "r")) == NULL) {
+ && (etherf = fopen(XT_PATH_ETHERTYPES, "r")) == NULL) {
return (NULL);
}