Skip to content

Commit

Permalink
netfilter: nf_log_common: merge with nf_log_syslog
Browse files Browse the repository at this point in the history
Remove nf_log_common.  Now that all per-af modules have been merged
there is no longer a need to provide a helper module.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  • Loading branch information
Florian Westphal authored and Pablo Neira Ayuso committed Mar 31, 2021
1 parent 77ccee9 commit e465ccc
Show file tree
Hide file tree
Showing 5 changed files with 181 additions and 258 deletions.
24 changes: 0 additions & 24 deletions include/net/netfilter/nf_log.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,28 +98,4 @@ struct nf_log_buf;
struct nf_log_buf *nf_log_buf_open(void);
__printf(2, 3) int nf_log_buf_add(struct nf_log_buf *m, const char *f, ...);
void nf_log_buf_close(struct nf_log_buf *m);

/* common logging functions */
int nf_log_dump_udp_header(struct nf_log_buf *m, const struct sk_buff *skb,
u8 proto, int fragment, unsigned int offset);
int nf_log_dump_tcp_header(struct nf_log_buf *m, const struct sk_buff *skb,
u8 proto, int fragment, unsigned int offset,
unsigned int logflags);
void nf_log_dump_sk_uid_gid(struct net *net, struct nf_log_buf *m,
struct sock *sk);
void nf_log_dump_vlan(struct nf_log_buf *m, const struct sk_buff *skb);
void nf_log_dump_packet_common(struct nf_log_buf *m, u_int8_t pf,
unsigned int hooknum, const struct sk_buff *skb,
const struct net_device *in,
const struct net_device *out,
const struct nf_loginfo *loginfo,
const char *prefix);
void nf_log_l2packet(struct net *net, u_int8_t pf,
__be16 protocol,
unsigned int hooknum,
const struct sk_buff *skb,
const struct net_device *in,
const struct net_device *out,
const struct nf_loginfo *loginfo, const char *prefix);

#endif /* _NF_LOG_H */
8 changes: 2 additions & 6 deletions net/netfilter/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,13 @@ config NF_CONNTRACK

To compile it as a module, choose M here. If unsure, say N.

config NF_LOG_COMMON
tristate

config NF_LOG_SYSLOG
tristate "Syslog packet logging"
default m if NETFILTER_ADVANCED=n
select NF_LOG_COMMON
help
This option enable support for packet logging via syslog.
It supports IPv4 and common transport protocols such as TCP and UDP.
It supports IPv4, IPV6, ARP and common transport protocols such
as TCP and UDP.
This is a simpler but less flexible logging method compared to
CONFIG_NETFILTER_NETLINK_LOG.
If both are enabled the backend to use can be configured at run-time
Expand Down Expand Up @@ -930,7 +927,6 @@ config NETFILTER_XT_TARGET_LED

config NETFILTER_XT_TARGET_LOG
tristate "LOG target support"
select NF_LOG_COMMON
select NF_LOG_SYSLOG
select NF_LOG_IPV6 if IP6_NF_IPTABLES
default m if NETFILTER_ADVANCED=n
Expand Down
2 changes: 0 additions & 2 deletions net/netfilter/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ obj-$(CONFIG_NF_CONNTRACK_TFTP) += nf_conntrack_tftp.o

nf_nat-y := nf_nat_core.o nf_nat_proto.o nf_nat_helper.o

# generic transport layer logging
obj-$(CONFIG_NF_LOG_COMMON) += nf_log_common.o
obj-$(CONFIG_NF_LOG_SYSLOG) += nf_log_syslog.o

obj-$(CONFIG_NF_NAT) += nf_nat.o
Expand Down
224 changes: 0 additions & 224 deletions net/netfilter/nf_log_common.c

This file was deleted.

Loading

0 comments on commit e465ccc

Please sign in to comment.