Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netpfil/ipfw/ip_fw_log.c
Show First 20 Lines • Show All 101 Lines • ▼ Show 20 Lines | ipfw_log(struct ip_fw_chain *chain, struct ip_fw *f, u_int hlen, | ||||
struct ip_fw_args *args, struct mbuf *m, struct ifnet *oif, | struct ip_fw_args *args, struct mbuf *m, struct ifnet *oif, | ||||
u_short offset, uint32_t tablearg, struct ip *ip) | u_short offset, uint32_t tablearg, struct ip *ip) | ||||
{ | { | ||||
char *action; | char *action; | ||||
int limit_reached = 0; | int limit_reached = 0; | ||||
char action2[92], proto[128], fragment[32]; | char action2[92], proto[128], fragment[32]; | ||||
if (V_fw_verbose == 0) { | if (V_fw_verbose == 0) { | ||||
if (args->eh) /* layer2, use orig hdr */ | if (args->flags & IPFW_ARGS_ETHER) /* layer2, use orig hdr */ | ||||
ipfw_bpf_mtap2(args->eh, ETHER_HDR_LEN, m); | ipfw_bpf_mtap2(args->eh, ETHER_HDR_LEN, m); | ||||
else { | else { | ||||
/* Add fake header. Later we will store | /* Add fake header. Later we will store | ||||
* more info in the header. | * more info in the header. | ||||
*/ | */ | ||||
if (ip->ip_v == 4) | if (ip->ip_v == 4) | ||||
ipfw_bpf_mtap2("DDDDDDSSSSSS\x08\x00", | ipfw_bpf_mtap2("DDDDDDSSSSSS\x08\x00", | ||||
ETHER_HDR_LEN, m); | ETHER_HDR_LEN, m); | ||||
▲ Show 20 Lines • Show All 308 Lines • Show Last 20 Lines |