diff options
author | Philip Paeps <philip@FreeBSD.org> | 2019-10-06 04:26:37 +0000 |
---|---|---|
committer | Philip Paeps <philip@FreeBSD.org> | 2019-10-06 04:26:37 +0000 |
commit | 30a580a870fabfea51e4b970c488e58bd1515ce4 (patch) | |
tree | cf18fcdc7c1818418ee5fc375ca4ba2094583a41 /pcap-netfilter-linux.c | |
parent | d109bf9e4b609b5a0626b433e56db4a47dc530bb (diff) |
Notes
Diffstat (limited to 'pcap-netfilter-linux.c')
-rw-r--r-- | pcap-netfilter-linux.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pcap-netfilter-linux.c b/pcap-netfilter-linux.c index d5c5dcdc4850..91bad371b53d 100644 --- a/pcap-netfilter-linux.c +++ b/pcap-netfilter-linux.c @@ -301,7 +301,8 @@ netfilter_stats_linux(pcap_t *handle, struct pcap_stat *stats) static int netfilter_inject_linux(pcap_t *handle, const void *buf _U_, size_t size _U_) { - pcap_snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "inject not supported on netfilter devices"); + pcap_snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, + "Packet injection is not supported on netfilter devices"); return (-1); } @@ -315,6 +316,7 @@ static int netfilter_send_config_msg(const pcap_t *handle, uint16_t msg_type, int ack, u_int8_t family, u_int16_t res_id, const struct my_nfattr *mynfa) { char buf[1024] __attribute__ ((aligned)); + memset(buf, 0, sizeof(buf)); struct nlmsghdr *nlh = (struct nlmsghdr *) buf; struct nfgenmsg *nfg = (struct nfgenmsg *) (buf + sizeof(struct nlmsghdr)); |