aboutsummaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorBill Fenner <fenner@FreeBSD.org>2001-10-17 04:23:14 +0000
committerBill Fenner <fenner@FreeBSD.org>2001-10-17 04:23:14 +0000
commit05153c617ddadcc0f7dfc5578af3e3284da0a22e (patch)
treefa6a6f2d7c7f6554c7e2c1cc026ec36fffcdab4b /sys/net
parentb9d45cebf476588f9bbe0c5534fd3a7cb2f0528e (diff)
Notes
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index 5e7b5bc112f6..f542b4198fbb 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -344,7 +344,7 @@ found:
name, unit, devname);
}
for (unit = 1; ; unit++) {
- if (unit < if_index && ifaddr_byindex(unit) != NULL)
+ if (unit <= if_index && ifaddr_byindex(unit) != NULL)
continue;
if (resource_string_value(name, unit, "ether", &p) == 0 ||
resource_string_value(name, unit, "dev", &p) == 0)
@@ -382,8 +382,8 @@ if_attach(ifp)
SLIST_INIT(&ifp->if_klist);
getmicrotime(&ifp->if_lastchange);
ifp->if_index = if_findindex(ifp);
- if (ifp->if_index >= if_index)
- if_index = ifp->if_index + 1;
+ if (ifp->if_index > if_index)
+ if_index = ifp->if_index;
if (if_index >= if_indexlim)
if_grow();