Package: ppp
Version: 2.4.3-20050321+2
Severity: normal
Tags: patch
When work with rp-pppoe.so, the mtu of ppp0 device
will be 1492 always.
I need set the mtu of my ppp0 device to 1488 or less,
for some reason, my isp or my dsl-modem don't accept
packet bigger then 1514 bytes.
Change mtu setting of ppp configuration won't work.
I found the cvs version of ppp work.
The following patch is pulled from the cvs version of ppp.
diff -urN ppp-2.4.3/pppd/plugins/rp-pppoe/plugin.c
ppp-2.4.3-lepton/pppd/plugins/rp-pppoe/plugin.c
--- ppp-2.4.3/pppd/plugins/rp-pppoe/plugin.c 2004-11-04 18:07:37.000000000
+0800
+++ ppp-2.4.3-lepton/pppd/plugins/rp-pppoe/plugin.c 2006-05-15
22:54:21.000000000 +0800
@@ -22,7 +22,7 @@
***********************************************************************/
static char const RCSID[] =
-"$Id: plugin.c,v 1.12 2004/11/04 10:07:37 paulus Exp $";
+"$Id: plugin.c,v 1.14 2005/08/25 10:51:27 paulus Exp $";
#define _GNU_SOURCE 1
#include "pppoe.h"
@@ -182,34 +182,6 @@
}
static void
-PPPOESendConfig(int mtu,
- u_int32_t asyncmap,
- int pcomp,
- int accomp)
-{
- int sock;
- struct ifreq ifr;
-
- if (mtu > MAX_PPPOE_MTU) {
- warn("Couldn't increase MTU to %d", mtu);
- mtu = MAX_PPPOE_MTU;
- }
- sock = socket(AF_INET, SOCK_DGRAM, 0);
- if (sock < 0) {
- error("Couldn't create IP socket: %m");
- return;
- }
- strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
- ifr.ifr_mtu = mtu;
- if (ioctl(sock, SIOCSIFMTU, &ifr) < 0) {
- error("Couldn't set interface MTU to %d: %m", mtu);
- return;
- }
- (void) close (sock);
-}
-
-
-static void
PPPOERecvConfig(int mru,
u_int32_t asyncmap,
int pcomp,
@@ -331,6 +303,11 @@
lcp_allowoptions[0].neg_pcompression = 0;
lcp_wantoptions[0].neg_pcompression = 0;
+ if (lcp_allowoptions[0].mru > MAX_PPPOE_MTU)
+ lcp_allowoptions[0].mru = MAX_PPPOE_MTU;
+ if (lcp_wantoptions[0].mru > MAX_PPPOE_MTU)
+ lcp_wantoptions[0].mru = MAX_PPPOE_MTU;
+
ccp_allowoptions[0].deflate = 0 ;
ccp_wantoptions[0].deflate = 0 ;
@@ -433,7 +410,7 @@
disconnect: &PPPOEDisconnectDevice,
establish_ppp: &generic_establish_ppp,
disestablish_ppp: &generic_disestablish_ppp,
- send_config: &PPPOESendConfig,
+ send_config: NULL,
recv_config: &PPPOERecvConfig,
close: NULL,
cleanup: NULL
-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.13.1-skas3-v8.2
Locale: LANG=zh_CN, LC_CTYPE=zh_CN.GB2312 (charmap=GB2312)
Versions of packages ppp depends on:
ii libc6 2.3.2.ds1-22 GNU C Library: Shared libraries an
ii libpam-modules 0.76-22 Pluggable Authentication Modules f
ii libpam-runtime 0.76-22 Runtime support for the PAM librar
ii libpam0g 0.76-22 Pluggable Authentication Modules l
ii libpcap0.7 0.7.2-7 System interface for user-level pa
ii makedev 2.3.1-77 creates device files in /dev
ii netbase 4.21 Basic TCP/IP networking system
ii procps 1:3.2.1-2 The /proc file system utilities
ii zlib1g 1:1.2.2-4.sarge.2 compression library - runtime
-- no debconf information
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]