diff options
author | ru <ru@FreeBSD.org> | 2004-01-23 15:53:23 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2004-01-23 15:53:23 +0000 |
commit | 37783c5ffd462fc7902b9ce212d81a6146e8c77b (patch) | |
tree | a7dea10d8a58c4de8c78bda36626faebff32db26 | |
parent | 9942270d4860991a7f7306067796cee51afaf7ca (diff) | |
download | FreeBSD-src-37783c5ffd462fc7902b9ce212d81a6146e8c77b.zip FreeBSD-src-37783c5ffd462fc7902b9ce212d81a6146e8c77b.tar.gz |
Don't panic if there are more than 255 interfaces in the system.
-rw-r--r-- | sys/net/if.c | 3 |
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", |