| Summary: | startslip can't load if_sl.ko | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | osa <osa> | ||||
| Component: | bin | Assignee: | Ceri Davies <ceri> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | 5.0-CURRENT | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
osa
2001-08-01 11:10:07 UTC
"Sergey A.Osokin" <osa@FreeBSD.org.ru> wrote: > @@ -428,6 +428,21 @@ > * Attach > */ > printd("setd"); > + > + /* > + * Attempt to load the SLIP interface KLD if it isn't loaded > + * already. > + */ > +#if defined(__FreeBSD__) && !defined(NOKLDLOAD) What's the point of this conditional? This program doesn't check __FreeBSD__ anywhere else, and it operates on a kernel device, so I think it's rather pointless. Ditto for NOKLDLOAD. The only thing that checks these is ppp(8), and ppp(8) *is* expected to work on systems other than FreeBSD. All other programs that do something like this (e.g., ccdconfig, ifconfig) don't perform these checks. > + if (modfind("if_sl") == -1) { > + if (kldload("if_sl") == -1) { You should probably check that the module was really loaded, since the mapping between klds and modules isn't clear. For example, the "if_sl" module doesn't have to exist in the file called if_sl.ko. Most other programs do something like this: if (modfind(MODULE) < 0) { /* Not present in kernel, try loading it */ if (kldload(MODULE) < 0 || modfind(MODULE) < 0) warn("module not available!"); Ignore the "< 0" tests; those are wrong. They should be "== -1" like in your patch. > + syslog(LOG_ERR, "kldload if_sl: %s\n", > + strerror(errno)); > + down(2); As above, most programs don't consider it a fatal error if they can't find the module. I don't see why this should, either. Thanks. State Changed From-To: open->feedback Sergey, if this is still an issue, could you please modify your patch and incorporate Dima's suggestions? State Changed From-To: feedback->closed Feedback timeout (6 months or more). I will handle any feedback that this closure generates. Responsible Changed From-To: freebsd-bugs->ceri Feedback timeout (6 months or more). I will handle any feedback that this closure generates. |