12 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
14 #include <linux/audit.h>
15 #include <linux/module.h>
17 #include <linux/tcp.h>
18 #include <linux/udp.h>
19 #include <linux/if_arp.h>
20 #include <linux/netfilter/x_tables.h>
22 #include <linux/netfilter_bridge/ebtables.h>
44 pptr = skb_header_pointer(skb, offset,
sizeof(_ports), _ports);
60 iptr = skb_header_pointer(skb, offset,
sizeof(_ih), &_ih);
77 const struct iphdr *ih;
79 ih = skb_header_pointer(skb, 0,
sizeof(_iph), &_iph);
93 audit_proto(ab, skb, ih->
protocol, ih->ihl * 4);
104 ih = skb_header_pointer(skb, skb_network_offset(skb),
sizeof(_ip6h), &_ip6h);
112 &nexthdr, &frag_off);
118 audit_proto(ab, skb, nexthdr, offset);
133 par->
in ? par->
in->name :
"?",
134 par->
out ? par->
out->name :
"?");
145 switch (eth_hdr(skb)->
h_proto) {
167 #ifdef CONFIG_NETWORK_SECMARK
169 audit_log_secctx(ab, skb->secmark);
190 pr_info(
"Audit type out of range (valid range: 0..%hhu)\n",
204 .checkentry = audit_tg_check,
210 .target = audit_tg_ebt,
212 .checkentry = audit_tg_check,
217 static int __init audit_tg_init(
void)
222 static void __exit audit_tg_exit(
void)