diff options
| author | 2004-05-31 13:04:13 +0000 | |
|---|---|---|
| committer | 2004-05-31 13:04:13 +0000 | |
| commit | 784aa0952bd6ea4254f49a1c21fcae16a6dedcbe (patch) | |
| tree | 2fbe90ef3110ebd6887816e3a8662904a7d7100f /sys/net/bpf.c | |
| parent | reset sysctls only when necessary (diff) | |
| download | wireguard-openbsd-784aa0952bd6ea4254f49a1c21fcae16a6dedcbe.tar.xz wireguard-openbsd-784aa0952bd6ea4254f49a1c21fcae16a6dedcbe.zip | |
remove the broken auto-append-'0' code; ok canacar, deraadt, thierry
Diffstat (limited to 'sys/net/bpf.c')
| -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. |
