source: npl/internetserver/poptop_ppp/patches/ppp-2.4.2-pppoatm-mtu.patch @ 5160d62

perl-5.22
Last change on this file since 5160d62 was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100644
File size: 872 bytes
RevLine 
[c5c522c]1--- ppp-2.4.2/pppd/plugins/pppoatm/pppoatm.c.mtu        2004-10-07 13:32:05.660910432 +0100
2+++ ppp-2.4.2/pppd/plugins/pppoatm/pppoatm.c    2004-10-07 13:58:20.096559832 +0100
3@@ -175,8 +175,10 @@
4 {
5        int sock;
6        struct ifreq ifr;
7-       if (mtu > pppoatm_max_mtu)
8-               error("Couldn't increase MTU to %d", mtu);
9+       if (pppoatm_max_mtu && mtu > pppoatm_max_mtu) {
10+               warn("Couldn't increase MTU to %d. Using %d", mtu, pppoatm_max_mtu);
11+               mtu = pppoatm_max_mtu;
12+       }
13        sock = socket(AF_INET, SOCK_DGRAM, 0);
14        if (sock < 0)
15                fatal("Couldn't create IP socket: %m");
16@@ -192,8 +194,10 @@
17                              int pcomp,
18                              int accomp)
19 {
20-       if (mru > pppoatm_max_mru)
21-               error("Couldn't increase MRU to %d", mru);
22+       if (pppoatm_max_mru && mru > pppoatm_max_mru) {
23+               warn("Couldn't increase MRU to %d. Using %d", mru, pppoatm_max_mru);
24+               mru = pppoatm_max_mru;
25+       }
26 }
27 
28 void plugin_init(void)
Note: See TracBrowser for help on using the repository browser.