From 37783c5ffd462fc7902b9ce212d81a6146e8c77b Mon Sep 17 00:00:00 2001 From: ru Date: Fri, 23 Jan 2004 15:53:23 +0000 Subject: Don't panic if there are more than 255 interfaces in the system. --- sys/net/if.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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", -- cgit v1.1