Skip to contentSkip to conversation

Bridge support unavailable

Bridge [email protected] 2 participants 3 messages Jul 13, 2004 – Jul 14, 2004 Ethernet bridge

lore
Share & tools
lore
#0 lore raw

Stephen,

The module will only autoload if /etc/modules.conf is setup for it. Checking redhat 7.3, redhat 9.0, WhiteBox EL3, Suse 8.0 and Suse 9.0 systems, none have anything to cause bridge.o to alias to br0. Those are the only systems I have to look at. I don't know what other distros like debian or mandrake do for bridge.o. They might have it in the modules.conf file... Dunno.

So, Bert, you'll need to add something like this to /etc/modules.conf:

alias br0 bridge

The stuff I sent before was in the nature of diagnostics and debugging

I'm still trying to get my beridge.o to build cleanly :(

Quoted 30 lines

On Tue, 13 Jul 2004 11:17:51 -0500
Stephen Hemminger <[email protected]> wrote ..

Quoted 6 lines · On Tue, 13 Jul 2004 11:17:51 -0500 "Bert Hubbs" <[email protected]> wrote:

Yep!
First lsmod I got no bridge. Second lsmod after modprobe bridge I got bridge listed. So here comes the $35 question. How do you make the module load at boot?
After Googleing modprobe, lsmod, insmod there seems to be know way to use modprobe to load modules at boot. I came across discussion to add

it

Quoted 3 lines

to modprobe.conf but others said this would not cause it to load at boot. Another mentioned rc.local but I'm not sure that rc.local will load at the right time. On the other had that may not matter but I'm

in

Quoted 3 lines

to cleanliness.

Any suggestions?

Your working too hard at getting it loaded. The kernel will automatically load the bridge module when the first bridge is created with brctl. Since brctl has to do an ioctl() to create a bridge, the kernel will load the module if needed. You can't build the bridge module seperate from the kernel. The kernel needs to know the bridge
module is coming to have the necessary hooks.

Just doing:
brctl addbr br0
should create bridge br0 and load the bridge module.

#1 lore raw
Quoted 4 lines · On Tue, 13 Jul 2004 13:15:57 -0700 [email protected] wrote:

Stephen,

The module will only autoload if /etc/modules.conf is setup for it. Checking redhat 7.3, redhat 9.0, WhiteBox EL3, Suse 8.0 and Suse 9.0 systems, none have anything to cause bridge.o to alias to br0. Those are the only systems I have to look at. I don't know what other distros like debian or mandrake do for bridge.o. They might have it in the modules.conf file... Dunno.

Wrong! It gets done by:
static int sock_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
unsigned long arg)

{
	...
	switch(cmd) {
	...
		case SIOCGIFBR:
		case SIOCSIFBR:
		case SIOCBRADDBR:
		case SIOCBRDELBR:
			err = -ENOPKG;
			if (!br_ioctl_hook)
				request_module("bridge");
Quoted 3 lines

So, Bert, you'll need to add something like this to /etc/modules.conf:

alias br0 bridge

Don't do that. It will autoload the bridge, but br0 will not be created automatically! I.e. if the configuration script does:
ifconfig br0 up

Then it will load the bridge module, but since the bridge hasn't been created you will get "no such device" error.

#2 lore raw

OK Stephen,

I will stipulate the code fragment you've provided is supposed to load the bridge.o module... BUT from the previous statements, it doesn't work that way for Bert. As I mentioned my compile of the module has all those nasty undefined symbol errors so until I get that right all I can do is talk about the way other modules work.

Is that fragment from brctl BTW?

Quoted 39 lines · Stephen Hemminger
Quoted 4 lines · On Tue, 13 Jul 2004 13:15:57 -0700 [email protected] wrote:

Stephen,

The module will only autoload if /etc/modules.conf is setup for it. Checking redhat 7.3, redhat 9.0, WhiteBox EL3, Suse 8.0 and Suse 9.0 systems, none have anything to cause bridge.o to alias to br0. Those are the only systems I have to look at. I don't know what other distros like debian or mandrake do for bridge.o. They might have it in the modules.conf file... Dunno.

Wrong! It gets done by:
static int sock_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
unsigned long arg)

{
	...
	switch(cmd) {
	...
		case SIOCGIFBR:
		case SIOCSIFBR:
		case SIOCBRADDBR:
		case SIOCBRDELBR:
			err = -ENOPKG;
			if (!br_ioctl_hook)
				request_module("bridge");
Quoted 3 lines

So, Bert, you'll need to add something like this to /etc/modules.conf:

alias br0 bridge

Don't do that. It will autoload the bridge, but br0 will not be created automatically! I.e. if the configuration script does:
ifconfig br0 up

Then it will load the bridge module, but since the bridge hasn't been created you will get "no such device" error.