summaryrefslogtreecommitdiffstats
path: root/sys/net/if.c
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2004-01-23 15:53:23 +0000
committerru <ru@FreeBSD.org>2004-01-23 15:53:23 +0000
commit37783c5ffd462fc7902b9ce212d81a6146e8c77b (patch)
treea7dea10d8a58c4de8c78bda36626faebff32db26 /sys/net/if.c
parent9942270d4860991a7f7306067796cee51afaf7ca (diff)
downloadFreeBSD-src-37783c5ffd462fc7902b9ce212d81a6146e8c77b.zip
FreeBSD-src-37783c5ffd462fc7902b9ce212d81a6146e8c77b.tar.gz
Don't panic if there are more than 255 interfaces in the system.
Diffstat (limited to 'sys/net/if.c')
-rw-r--r--sys/net/if.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index 6453be4..6fed45c 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -397,7 +397,8 @@ if_attach(struct ifnet *ifp)
if_grow();
ifnet_byindex(ifp->if_index) = ifp;
- ifdev_byindex(ifp->if_index) = make_dev(&net_cdevsw, ifp->if_index,
+ ifdev_byindex(ifp->if_index) = make_dev(&net_cdevsw,
+ unit2minor(ifp->if_index),
UID_ROOT, GID_WHEEL, 0600, "%s/%s",
net_cdevsw.d_name, ifp->if_xname);
make_dev_alias(ifdev_byindex(ifp->if_index), "%s%d",
OpenPOWER on IntegriCloud