Re: RSTP in http://git.kernel.org/?p=linux/kernel/git/shemminger/rstp.git; a=summary problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2008-03-31 at 12:55 +0530, Srinivas M.A. wrote:
> >
> >  Ahh, I didn't copy bridge-stp to /sbin because I didn't think it was
> >  needed. Just to test I blindly copied it to /sbin and did:
> >   brclt addbr br0
> >
> >  brctl addif br0 eth0
> >   brctl stp br0
> >  and it hung my board :(
> 
> What did your /sbin/bridge-stp have. The file from the tarball? Try a
> simple one which just does exit 0.

Yes, form the tarball. Now I have replace it with a
  #!/bin/bash
  exit 0
and now it works(well it starts and activates RSTP) :)
So something isn't well with the included bridge-stp and
you can hang your system too.

Just for fun I tried what would happen if i never started rstpd,
then I get:

strace ./rstpctl showbridge
....
open("/dev/urandom", O_RDONLY)          = 3
read(3, "@\336\316\223", 4)             = 4
close(3)                                = 0
socket(PF_FILE, SOCK_DGRAM, 0)          = 3
getpid()                                = 245
bind(3, {sa_family=AF_FILE, path=@RSTPCTL_245}, 110) = 0
connect(3, {sa_family=AF_FILE, path=@.rstp_server}, 110) = -1
ECONNREFUSED (Connection refused)
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Process 245 detached
root@xxxxxxxxxxxx:~# m /sys/class/net/br0/bridge/stp_state
2

So I both get a SEGV and the kernel thinks userspace is running STP, not
ideal.

I really think one should be able to start RSTP with rtspctl too so
one doesn't need /sbin/bridge-stp

> 
> >  Meanwhile I got 2 patches for you:
> >
> 
> I didn't realize offsetof() was in stddef.h. Thanks.

I you want, you can remove the #ifndef too, gcc 3.4.6 has offsetof in
stddef.h

> 
> The __builtin_choose_expr stuff is there to trigger a compiler error
> if I try to compare or copy two structs of different sizes. I should
> just make that portion dependent on having a new enough gcc.

I removed it because I don't like having gcc extension in the code,
makes it dependend on gcc and harder to understand. gcc 3.4.6 can handle
this builtin fine.

 Jocke
_______________________________________________
Bridge mailing list
Bridge@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/bridge

[Index of Archives]     [Netdev]     [AoE Tools]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux