29 lines
872 B
Diff
29 lines
872 B
Diff
|
--- ppp-2.4.2/pppd/plugins/pppoatm/pppoatm.c.mtu 2004-10-07 13:32:05.660910432 +0100
|
||
|
+++ ppp-2.4.2/pppd/plugins/pppoatm/pppoatm.c 2004-10-07 13:58:20.096559832 +0100
|
||
|
@@ -175,8 +175,10 @@
|
||
|
{
|
||
|
int sock;
|
||
|
struct ifreq ifr;
|
||
|
- if (mtu > pppoatm_max_mtu)
|
||
|
- error("Couldn't increase MTU to %d", mtu);
|
||
|
+ if (pppoatm_max_mtu && mtu > pppoatm_max_mtu) {
|
||
|
+ warn("Couldn't increase MTU to %d. Using %d", mtu, pppoatm_max_mtu);
|
||
|
+ mtu = pppoatm_max_mtu;
|
||
|
+ }
|
||
|
sock = socket(AF_INET, SOCK_DGRAM, 0);
|
||
|
if (sock < 0)
|
||
|
fatal("Couldn't create IP socket: %m");
|
||
|
@@ -192,8 +194,10 @@
|
||
|
int pcomp,
|
||
|
int accomp)
|
||
|
{
|
||
|
- if (mru > pppoatm_max_mru)
|
||
|
- error("Couldn't increase MRU to %d", mru);
|
||
|
+ if (pppoatm_max_mru && mru > pppoatm_max_mru) {
|
||
|
+ warn("Couldn't increase MRU to %d. Using %d", mru, pppoatm_max_mru);
|
||
|
+ mru = pppoatm_max_mru;
|
||
|
+ }
|
||
|
}
|
||
|
|
||
|
void plugin_init(void)
|