diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2004-05-31 13:04:14 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2004-05-31 13:04:14 +0000 |
commit | 33097da5af566af8bfa55c87ab1aa6cf6c6654cd (patch) | |
tree | 63ca1bb81443c7ed32207c055bcafe692cee87da /sys/net | |
parent | a49219050b77a6a2a85ff4feef64506c464c7378 (diff) |
remove the broken auto-append-'0' code; ok canacar, deraadt, thierry
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/bpf.c | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 8e6c216e67f..872cc2ab1ae 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bpf.c,v 1.47 2004/05/28 08:16:23 grange Exp $ */ +/* $OpenBSD: bpf.c,v 1.48 2004/05/31 13:04:13 markus Exp $ */ /* $NetBSD: bpf.c,v 1.33 1997/02/21 23:59:35 thorpej Exp $ */ /* @@ -935,31 +935,7 @@ bpf_setif(d, ifr) struct ifreq *ifr; { struct bpf_if *bp; - char *cp; - int unit_seen, i, s, error; - - /* - * Make sure the provided name has a unit number, and default - * it to '0' if not specified. - * XXX This is ugly ... do this differently? - */ - unit_seen = 0; - cp = ifr->ifr_name; - cp[sizeof(ifr->ifr_name) - 1] = '\0'; /* sanity */ - while (*cp++) - if (*cp >= '0' && *cp <= '9') - unit_seen = 1; - if (!unit_seen) { - /* Make sure to leave room for the '\0'. */ - for (i = 0; i < (IFNAMSIZ - 1); ++i) { - if ((ifr->ifr_name[i] >= 'a' && - ifr->ifr_name[i] <= 'z') || - (ifr->ifr_name[i] >= 'A' && - ifr->ifr_name[i] <= 'Z')) - continue; - ifr->ifr_name[i] = '0'; - } - } + int s, error; /* * Look through attached interfaces for the named one. |