On Sunday 09 November 2003 05:07, Olivier Blin wrote: > On Sun, 9 Nov 2003 02:50:46 +0100 > > Olivier Blin <[EMAIL PROTECTED]> wrote: > > On Sun, 9 Nov 2003 01:23:35 +0100 > > > > Oden Eriksson <[EMAIL PROTECTED]> wrote: > > > Another thing. I noticed ivp6 was loaded per default, why is that? > > > > Hum, you're right, I don't know why, perhaps a wrong module > > dependency. > > It's loaded by the network init script (/etc/rc.d/init.d/network) : > > ----- > # If IPv6 is explicitly configured, make sure it's available. > if [ "$NETWORKING_IPV6" = "yes" ]; then > alias=`modprobe -c | awk '/^alias net-pf-10 / { print $3 }'` > if [ "$alias" != "ipv6" -a ! -f /proc/net/if_inet6 ]; then > case "$(modprobe -V 2>/dev/null)" in > modprobe* ) > echo "alias net-pf-10 ipv6" >> > /etc/modules.conf > ;; > module-init-tools* ) > echo "alias net-pf-10 ipv6" >> > /etc/modprobe.conf > ;; > esac > fi > fi > ----- > > $ grep ipv6 /lib/modules/`uname -r`/modules.alias > alias net-pf-10 ipv6 > > An alias is made to ipv6 in modules configuration files, so the > network script loads it. > I don't know if it's the correct behaviour what do you think ? > > I'm cc-ing Andrey because he's the author of modprobe configuration > files, so he's likely to help us :)
I am not sure what the exact question is, so I try to guess. /lib/modules/`uname -r`/modules.alias is created by depmod based on alias information from modules themselves. {pts/1}% grep MODULE_ALIAS * af_inet6.c:MODULE_ALIAS_NETPROTO(PF_INET6); This is to finally replace static driver-to-{major,pf-number,ldisc-number,whatever} mapping from old modutils. The part you quoted is not relevant because it is executed only as long as IPV6 is explicitly enabled. Nor is it needed actually as you have seen. Nor is it the correct way to handle it because it breaks if module name is changed for whatever reason. So I guess that some program tries to use IPV6 by default which results in module being autoloaded. The part in /etc/init.d/network was needed in modutils because it defaulted to IPV6 off: {pts/1}% modprobe-24 -c | grep net-pf-10 modprobe: QM_MODULES: Function not implemented alias net-pf-10 off Till my last release of module-init-tools I had the same in /lib/module-init-tools/modprobe.default. The last version removed this line. So I guess for module-init-tools you have to explicitly add "alias net-pf-10 off" if IPV6 is not configured. Note that it may simply be too late because protocol can be already registered by some other before /etc/init.d/network ever starts. So what version of module-init-tools do you run? If you run my last version: {pts/1}% rpm -q module-init-tools module-init-tools-0.9.15-0.pre2.0.2bor loading of ipv6 should be "normal" :) Turn it off in modprobe.conf ... I do not suggest any patch because we need to establish some policy first. To recap: - kernel is expected to finally provide in-band module aliases that replace previous static configuration as found in modutils - for this reason any program or script that assume that net-pf-N or block-major-M or whatever is handled by specific module is broken by definition (hmm ... I wonder how they are going to handle dynamic device numbers when - if - they ever become available ...) - so we should start with assumption "everything configured in kernel is available" and configuration tools should blacklist or turn off those modules user does not need (want). Extreme case is disable kmod. Unfortunately overriding default values in module-init-tools does not work cleanly. Specifically modprobe -c output becomes highly confusing in this case. It is not a bug it is design decision :( -andrey