, <netbsd-users@netbsd.org>
From: Myrddin Emrys <netbsd@spiritusa.net>
List: netbsd-users
Date: 09/04/2001 10:08:25
Here's a summary of my current position.
I need to create a firewall with QoS controls. I'd prefer to do it with
NetBSD and AltQ, as that is the best OS for this purpose I've used yet.
However, I cannot get AltQ to function under NetBSD 1.5. Every time I
attempt to run altqd, I get the error:
altqd: can't open altq device: Device busy
I've been informed that this means I almost certainly have an incorrect
major number somewhere in the code. However, I've done all the patches,
recompiled the kernel and userland, and reviewed all the code as recommended
by those on the AltQ mailing list... and can still find no instance of an
inconsistency in the major numbers:
In file /src/sys-altq/conf/i386/i386/conf.c:
---------------
cdev_tty_init(NCZ,cztty), /* 73: Cyclades-Z serial port */
cdev_ses_init(NSES,ses), /* 74: SCSI SES/SAF-TE */
#ifdef ALTQ
cdev_notdef(), /* 75: ALTQ */
#endif
};
---------------
In file /src/sys-altq/altq/:
---------------
#elif defined(__NetBSD__)
#if defined(__i386__)
#define CDEV_MAJOR 75 /* NetBSD i386 (not official) */
#elif defined(__alpha__)
---------------
In dmesg output:
---------------
altq: major number is 75
---------------
Finally, in directory /dev/altq/:
---------------
total 32
drwxr-xr-x 2 root wheel 512 Aug 22 09:41 ./
drwxr-xr-x 4 root wheel 14848 Aug 22 09:41 ../
crw-r--r-- 1 root wheel 75, 3 Aug 22 09:41 afmap
crw-r--r-- 1 root wheel 75, 0 Aug 22 09:41 altq
crw-r--r-- 1 root wheel 75, 10 Aug 22 09:41 blue
crw-r--r-- 1 root wheel 75, 1 Aug 22 09:41 cbq
---------------
I don't know where else to look. The userland code doesn't use the major
number at all... it just uses the device filename. What else could be the
issue? What locations could I insert debugging print statements that would
help you guys diagnose my issue? I put some printf statements into
altqopen(), but that only confirmed that it was not being called properly/at
all.
This will be a production firewall... should I use NetBSD-current instead? I
understand it has altq integrated into the code already. Should I use
FreeBSD or OpenBSD instead? I understand at least FreeBSD has AltQ
integrated already. But I'm only familiar with NetBSD, I don't know how much
of an issue learning the different distribution would be.
Thank you for your suggestions.
Myrddin