| Summary: | 20 ethernet interfaces not compatible with option BRIDGE | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | dgilbert <dgilbert> | ||||
| Component: | kern | Assignee: | Luigi Rizzo <luigi> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | 4.0-STABLE | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
On Fri, 30 Jun 2000 09:39:14 -0400, dgilbert@velocet.ca wrote: > With 20 dc interfaces in my machine and "option BRIDGE" in the kernel, > I was crashing whenever I typed ifconfig -a... and about once a day > otherwise. This was stack smashing for some reason I think that this is Luigi's domain, but I don't want to assign the PR to him when I'm not sure. Luigi, wanna take this one? :-) Ciao, Sheldon. > > > On Fri, 30 Jun 2000 09:39:14 -0400, dgilbert@velocet.ca wrote: > > > With 20 dc interfaces in my machine and "option BRIDGE" in the kernel, > > I was crashing whenever I typed ifconfig -a... and about once a day > > otherwise. This was stack smashing for some reason > > I think that this is Luigi's domain, but I don't want to assign the PR > to him when I'm not sure. > > Luigi, wanna take this one? :-) i don't think this is related to bridging, there are no bridging hooks in ifconfig. To confirm this i would remove the "option BRIDGE" from the kernel and check if ifconfig -a still kills the system. A quick look at the ifconfig code seems to suggest that it could be the sysctl interface ? cheers luigi -----------------------------------+------------------------------------- Luigi RIZZO, luigi@iet.unipi.it . Dip. di Ing. dell'Informazione http://www.iet.unipi.it/~luigi/ . Universita` di Pisa TEL/FAX: +39-050-568.533/522 . via Diotisalvi 2, 56126 PISA (Italy) Mobile +39-347-0373137 -----------------------------------+------------------------------------- >>>>> "Luigi" == Luigi Rizzo <luigi@info.iet.unipi.it> writes: Luigi> i don't think this is related to bridging, there are no Luigi> bridging hooks in ifconfig. To confirm this i would remove the Luigi> "option BRIDGE" from the kernel and check if ifconfig -a still Luigi> kills the system. Luigi> A quick look at the ifconfig code seems to suggest that it Luigi> could be the sysctl interface ? already verified six ways from sunday. "option BRIDGE" in the kernel makes it crash when ifconfig -a runs. I have a box you can log into and test (with a serial console, even). But... I've been working on this for three days. I'm positive. Dave. -- ============================================================================ |David Gilbert, Velocet Communications. | Two things can only be | |Mail: dgilbert@velocet.net | equal if and only if they | |http://www.velocet.net/~dgilbert | are precisely opposite. | =========================================================GLO================ > already verified six ways from sunday. "option BRIDGE" in the kernel > makes it crash when ifconfig -a runs. and i saw your email about struct bdg_stats being too small... sorry! cheers luigi -----------------------------------+------------------------------------- Luigi RIZZO, luigi@iet.unipi.it . Dip. di Ing. dell'Informazione http://www.iet.unipi.it/~luigi/ . Universita` di Pisa TEL/FAX: +39-050-568.533/522 . via Diotisalvi 2, 56126 PISA (Italy) Mobile +39-347-0373137 -----------------------------------+------------------------------------- Responsible Changed From-To: freebsd-bugs->luigi Luigi is, after all, the right person for the job. :-) State Changed From-To: open->closed Fixed by a recent comment by upping the number of supported interfaces to 128, and making sure at runtime that the limit is not exceeded when creating new interfaces (pccards vlan and the like). |
With 20 dc interfaces in my machine and "option BRIDGE" in the kernel, I was crashing whenever I typed ifconfig -a... and about once a day otherwise. This was stack smashing for some reason Fix: I'm not 100% happy with this fix. The bdg_stats structure is used in: SYSCTL_STRUCT(_net_link_ether, PF_BDG, bdgstats, CTLFLAG_RD, &bdg_stats , bdg_stats, "bridge statistics"); and I'm not sure how to handle that. The most eggregarious error, however, is that BDG_MAX_PORTS was defined and the status structure was still defined with a constant 16 entries (not only that, but absolutely no bounds checking was done, *ever*). It would seem smart that this should be dynamic. I thought about that... and I just completely don't know what SYSCTL_STRUCT does ... But even if I did, it would only be half the job to allocate things here --- you really need to think about what happens when devices come or leave (leaving is fine, I suppose). Besides cardbus, we have hotswap PCI to worry about :). How-To-Repeat: option BRIDGE in a kernel and 20 interfaces (it would appear any type of ethernet interface will do) in the kernel. (I'm guessing that bridging doesn't work with vlans? sigh. would be nice).