diff options
Diffstat (limited to 'device')
-rw-r--r-- | device/net_io.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/device/net_io.c b/device/net_io.c index 4ebf996..fd71c02 100644 --- a/device/net_io.c +++ b/device/net_io.c @@ -394,7 +394,7 @@ int net_add_q_info (ipc_port_t rcv_port); int bpf_match ( net_hash_header_t hash, int n_keys, - unsigned long *keys, + unsigned int *keys, net_hash_entry_t **hash_headpp, net_hash_entry_t *entpp); @@ -1636,9 +1636,9 @@ bpf_do_filter(infp, p, wirelen, header, hlen, hash_headpp, entpp) register bpf_insn_t pc, pc_end; register unsigned int buflen; - register unsigned long A, X; + register unsigned int A, X; register int k; - unsigned long mem[BPF_MEMWORDS]; + unsigned int mem[BPF_MEMWORDS]; /* Generic pointer to either HEADER or P according to the specified offset. */ char *data = NULL; @@ -1689,9 +1689,9 @@ bpf_do_filter(infp, p, wirelen, header, hlen, hash_headpp, entpp) k = pc->k; load_word: - if ((u_int)k + sizeof(long) <= hlen) + if ((u_int)k + sizeof(int) <= hlen) data = header; - else if ((u_int)k + sizeof(long) <= buflen) { + else if ((u_int)k + sizeof(int) <= buflen) { k -= hlen; data = p; } else @@ -1702,7 +1702,7 @@ bpf_do_filter(infp, p, wirelen, header, hlen, hash_headpp, entpp) A = EXTRACT_LONG(&data[k]); else #endif - A = ntohl(*(long *)(data + k)); + A = ntohl(*(int *)(data + k)); continue; case BPF_LD|BPF_H|BPF_ABS: @@ -2032,7 +2032,7 @@ int bpf_match (hash, n_keys, keys, hash_headpp, entpp) net_hash_header_t hash; register int n_keys; - register unsigned long *keys; + register unsigned int *keys; net_hash_entry_t **hash_headpp, *entpp; { register net_hash_entry_t head, entp; |