X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fsys-sunos4.c;h=74c0217ef2908d7c5ae160164b53dc0a42fec180;hp=8724de55e950486800dc3abba6fe478d3d7bbe9d;hb=96dad36e1d37716004171559280613739e7df29e;hpb=26a7a28f129d72feaa08ef589e9a49aafd16d984 diff --git a/pppd/sys-sunos4.c b/pppd/sys-sunos4.c index 8724de5..74c0217 100644 --- a/pppd/sys-sunos4.c +++ b/pppd/sys-sunos4.c @@ -26,7 +26,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: sys-sunos4.c,v 1.7 1997/03/04 03:43:54 paulus Exp $"; +static char rcsid[] = "$Id: sys-sunos4.c,v 1.8 1997/04/30 05:58:52 paulus Exp $"; #endif #include @@ -603,7 +603,7 @@ output(unit, p, len) struct pollfd pfd; if (debug) - log_packet(p, len, "sent "); + log_packet(p, len, "sent ", LOG_DEBUG); data.len = len; data.buf = (caddr_t) p; @@ -738,6 +738,7 @@ ppp_send_config(unit, mtu, asyncmap, pcomp, accomp) int pcomp, accomp; { int cf[2]; + struct ifreq ifr; link_mtu = mtu; if (strioctl(pppfd, PPPIO_MTU, &mtu, sizeof(mtu), 0) < 0) { @@ -753,6 +754,14 @@ ppp_send_config(unit, mtu, asyncmap, pcomp, accomp) if (strioctl(pppfd, PPPIO_CFLAGS, cf, sizeof(cf), sizeof(int)) < 0) { syslog(LOG_ERR, "Couldn't set prot/AC compression: %m"); } + + /* set mtu for ip as well */ + memset(&ifr, 0, sizeof(ifr)); + strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); + ifr.ifr_metric = link_mtu; + if (ioctl(sockfd, SIOCSIFMTU, &ifr) < 0) { + syslog(LOG_ERR, "Couldn't set IP MTU: %m"); + } } /* @@ -987,10 +996,12 @@ sifaddr(u, o, h, m) if (ioctl(sockfd, SIOCSIFDSTADDR, &ifr) < 0) { syslog(LOG_ERR, "Couldn't set remote IP address: %m"); } +#if 0 /* now done in ppp_send_config */ ifr.ifr_metric = link_mtu; if (ioctl(sockfd, SIOCSIFMTU, &ifr) < 0) { syslog(LOG_ERR, "Couldn't set IP MTU: %m"); } +#endif ifaddrs[0] = o; ifaddrs[1] = h;