Root/package/ppp/patches/108-debian_pppatm_fix_mtu.patch

1--- a/pppd/plugins/pppoatm/pppoatm.c
2+++ b/pppd/plugins/pppoatm/pppoatm.c
3@@ -179,8 +179,11 @@ static void send_config_pppoa(int mtu,
4     int sock;
5     struct ifreq ifr;
6 
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",
11+ mtu, pppoatm_max_mtu);
12+ mtu = pppoatm_max_mtu;
13+ }
14 
15     sock = socket(AF_INET, SOCK_DGRAM, 0);
16     if (sock < 0)
17@@ -198,8 +201,11 @@ static void recv_config_pppoa(int mru,
18                   int pcomp,
19                   int accomp)
20 {
21- if (mru > pppoatm_max_mru)
22- error("Couldn't increase MRU to %d", mru);
23+ if (pppoatm_max_mru && mru > pppoatm_max_mru) {
24+ warn("Couldn't increase MRU to %d. Using %d",
25+ mru, pppoatm_max_mru);
26+ mru = pppoatm_max_mru;
27+ }
28 }
29 
30 void plugin_init(void)
31

Archive Download this file



interactive