diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2001-02-18 22:52:54 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2001-02-18 22:52:54 +0000 |
commit | 82a06bdc853fc449d8d5e11e9f4a9efa28d092bc (patch) | |
tree | 84c89efc2da8b99454c40a50f44d7cc60d3c7951 /usr.sbin | |
parent | 9271cd166beb2f8c0244f978fd6f0ee9cc5ad1c3 (diff) |
Try every bpf device, not only the even-numbered ones; jason@ ok
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pppoe/pppoe.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/pppoe/pppoe.c b/usr.sbin/pppoe/pppoe.c index 35740a131fe..5c5a3e5677a 100644 --- a/usr.sbin/pppoe/pppoe.c +++ b/usr.sbin/pppoe/pppoe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pppoe.c,v 1.2 2001/01/16 09:26:08 deraadt Exp $ */ +/* $OpenBSD: pppoe.c,v 1.3 2001/02/18 22:52:53 miod Exp $ */ /* * Copyright (c) 2000 Network Security Technologies, Inc. http://www.netsec.net @@ -253,8 +253,8 @@ setupfilter(ifn, ea, server_mode) filter.bf_len = idx; filter.bf_insns = insns; - for (i = 0; 1; i++) { - snprintf(device, sizeof(device), "/dev/bpf%d", i++); + for (i = 0; ; i++) { + snprintf(device, sizeof(device), "/dev/bpf%d", i); fd = open(device, O_RDWR); if (fd < 0) { if (errno != EBUSY) |