On Mon, Jun 02, 2014 at 01:26:20PM +0200, Arturo Borrero Gonzalez wrote: > diff --git a/net/netfilter/nft_log_inet.c b/net/netfilter/nft_log_inet.c > new file mode 100644 > index 0000000..b982df8 > --- /dev/null > +++ b/net/netfilter/nft_log_inet.c > @@ -0,0 +1,70 @@ > +/* > + * Copyright (c) 2008-2009 Patrick McHardy <kaber@xxxxxxxxx> > + * Copyright (c) 2014 Arturo Borrero Gonzalez <arturo.borrero.glez@xxxxxxxxx> > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License version 2 as > + * published by the Free Software Foundation. > + * > + */ > + > +#include <linux/kernel.h> > +#include <linux/init.h> > +#include <linux/module.h> > +#include <linux/netlink.h> > +#include <linux/netfilter.h> > +#include <linux/netfilter/nf_tables.h> > +#include <net/netfilter/nf_tables.h> > +#include <net/netfilter/nf_log.h> > +#include <linux/netdevice.h> > +#include <net/netfilter/nft_log.h> > +#include <net/netfilter/ipv4/nft_log_ipv4.h> > +#include <net/netfilter/ipv6/nft_log_ipv6.h> > + > +static void nft_log_inet_eval(const struct nft_expr *expr, > + struct nft_data data[NFT_REG_MAX + 1], > + const struct nft_pktinfo *pkt) > +{ > + switch (pkt->ops->pf) { > + case NFPROTO_IPV4: > + nft_log_ipv4_eval(expr, data, pkt); missing break here. Otherwise, it falls back on the IPv6 code too. > + case NFPROTO_IPV6: > + nft_log_ipv6_eval(expr, data, pkt); Not really needed, but my suggestion is to add it here as well for consistency. -- 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