summaryrefslogtreecommitdiff
path: root/usr.sbin/pppoe
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/pppoe')
-rw-r--r--usr.sbin/pppoe/pppoe.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/usr.sbin/pppoe/pppoe.c b/usr.sbin/pppoe/pppoe.c
index 5c5a3e5677a..015346f2d73 100644
--- a/usr.sbin/pppoe/pppoe.c
+++ b/usr.sbin/pppoe/pppoe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pppoe.c,v 1.3 2001/02/18 22:52:53 miod Exp $ */
+/* $OpenBSD: pppoe.c,v 1.4 2001/04/15 20:41:46 jason Exp $ */
/*
* Copyright (c) 2000 Network Security Technologies, Inc. http://www.netsec.net
@@ -186,7 +186,7 @@ setupfilter(ifn, ea, server_mode)
idx++;
insns[idx].code = BPF_JMP | BPF_JEQ | BPF_K;
- insns[idx].k = ep[4] << 8 | ep[5];
+ insns[idx].k = (ep[4] << 8) | (ep[5] << 0);
insns[idx].jt = 0;
insns[idx].jf = 1;
idx++;
@@ -223,7 +223,8 @@ setupfilter(ifn, ea, server_mode)
idx++;
insns[idx].code = BPF_JMP | BPF_JEQ | BPF_K;
- insns[idx].k = (ep[0]) | (ep[1] << 8) | (ep[3] << 16) | (ep[3] << 24);
+ insns[idx].k =
+ (ep[0] << 24) | (ep[1] << 16) | (ep[2] << 8) | (ep[3] << 0);
insns[idx].jt = 0;
insns[idx].jf = 3;
idx++;
@@ -234,7 +235,7 @@ setupfilter(ifn, ea, server_mode)
idx++;
insns[idx].code = BPF_JMP | BPF_JEQ | BPF_K;
- insns[idx].k = (ep[4]) | (ep[5] << 8);
+ insns[idx].k = (ep[4] << 8) | (ep[5] << 0);
insns[idx].jt = 0;
insns[idx].jf = 1;
idx++;
@@ -245,9 +246,7 @@ setupfilter(ifn, ea, server_mode)
idx++;
insns[idx].code = BPF_RET | BPF_K;
- insns[idx].k = (u_int)-1;
- insns[idx].jt = 0;
- insns[idx].jf = 0;
+ insns[idx].k = insns[idx].jt = insns[idx].jf = 0;
idx++;
filter.bf_len = idx;