- if (ioctl(ppp_fd, PPPIOCSMRU, (caddr_t) &mru) < 0) {
- if (errno != EIO && errno != ENOTTY)
- error("Couldn't set channel receive MRU: %m");
- else if (debug)
- dbglog("PPPIOCSMRU: %m");
- ret = -1;
- }
- if (new_style_driver && ifunit >= 0
- && ioctl(ppp_dev_fd, PPPIOCSMRU, (caddr_t) &mru) < 0) {
- error("Couldn't set MRU in generic PPP layer: %m");
- ret = -1;
- }
+ if (ioctl(ppp_fd, PPPIOCSMRU, (caddr_t) &mru) < 0) {
+ if (errno != EIO && errno != ENOTTY)
+ error("Couldn't set channel receive MRU: %m");
+ }
+ if (new_style_driver && ppp_dev_fd >= 0
+ && ioctl(ppp_dev_fd, PPPIOCSMRU, (caddr_t) &mru) < 0)
+ error("Couldn't set MRU in generic PPP layer: %m");