diff options
author | Xin LI <delphij@FreeBSD.org> | 2017-03-29 03:36:26 +0000 |
---|---|---|
committer | Xin LI <delphij@FreeBSD.org> | 2017-03-29 03:36:26 +0000 |
commit | e39babf8f748be2f9e4294100b92d316b5d5b67e (patch) | |
tree | 02fbe7a4202be480e86a5ed7c6e17ca88f2aade9 | |
parent | ca8478f6a95228a6f1c49d0d4100badaeda1976a (diff) | |
parent | 2369c04eb959fda4140b71f1c78798251bf43b62 (diff) | |
download | src-test2-e39babf8f748be2f9e4294100b92d316b5d5b67e.tar.gz src-test2-e39babf8f748be2f9e4294100b92d316b5d5b67e.zip |
Notes
-rw-r--r-- | contrib/libpcap/gencode.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/contrib/libpcap/gencode.c b/contrib/libpcap/gencode.c index d4ddc24df21a..406c08358ba2 100644 --- a/contrib/libpcap/gencode.c +++ b/contrib/libpcap/gencode.c @@ -525,7 +525,8 @@ static struct block *gen_host6(compiler_state_t *, struct in6_addr *, struct in6_addr *, int, int, int); #endif #ifndef INET6 -static struct block *gen_gateway(const u_char *, bpf_u_int32 **, int, int); +static struct block *gen_gateway(compiler_state_t *, const u_char *, + bpf_u_int32 **, int, int); #endif static struct block *gen_ipfrag(compiler_state_t *); static struct block *gen_portatom(compiler_state_t *, int, bpf_int32); @@ -692,7 +693,9 @@ pcap_compile(pcap_t *p, struct bpf_program *program, } initchunks(&cstate); cstate.no_optimize = 0; +#ifdef INET6 cstate.ai = NULL; +#endif cstate.ic.root = NULL; cstate.ic.cur_mark = 0; cstate.bpf_pcap = p; @@ -4904,11 +4907,8 @@ gen_host6(compiler_state_t *cstate, struct in6_addr *addr, #ifndef INET6 static struct block * -gen_gateway(eaddr, alist, proto, dir) - const u_char *eaddr; - bpf_u_int32 **alist; - int proto; - int dir; +gen_gateway(compiler_state_t *cstate, const u_char *eaddr, bpf_u_int32 **alist, + int proto, int dir) { struct block *b0, *b1, *tmp; @@ -6472,7 +6472,7 @@ gen_scode(compiler_state_t *cstate, const char *name, struct qual q) alist = pcap_nametoaddr(name); if (alist == NULL || *alist == NULL) bpf_error(cstate, "unknown host '%s'", name); - b = gen_gateway(eaddr, alist, proto, dir); + b = gen_gateway(cstate, eaddr, alist, proto, dir); free(eaddr); return b; #else |