X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fplugins%2Frp-pppoe%2Fplugin.c;h=1ea46a65efdedcca71b2aecda3b6e2177bf953ba;hb=71373d6f2d74ebb13d6697cb1cc1112033a71fc9;hp=3fa669c0d315a34a3e3702d9b43154c9a800b2eb;hpb=e9925858258e464095e7ee9d21a1facf789e9b38;p=ppp.git diff --git a/pppd/plugins/rp-pppoe/plugin.c b/pppd/plugins/rp-pppoe/plugin.c index 3fa669c..1ea46a6 100644 --- a/pppd/plugins/rp-pppoe/plugin.c +++ b/pppd/plugins/rp-pppoe/plugin.c @@ -22,7 +22,7 @@ ***********************************************************************/ static char const RCSID[] = -"$Id: plugin.c,v 1.11 2004/10/24 23:06:31 paulus Exp $"; +"$Id: plugin.c,v 1.13 2005/07/09 09:12:48 paulus Exp $"; #define _GNU_SOURCE 1 #include "pppoe.h" @@ -181,34 +181,6 @@ PPPOEConnectDevice(void) return conn->sessionSocket; } -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, @@ -244,6 +216,8 @@ PPPOEDisconnectDevice(void) return; } close(conn->sessionSocket); + /* don't send PADT?? */ + close(conn->discoverySocket); } static void @@ -329,6 +303,9 @@ PPPoEDevnameHook(char *cmd, char **argv, int doit) lcp_allowoptions[0].neg_pcompression = 0; lcp_wantoptions[0].neg_pcompression = 0; + lcp_allowoptions[0].mru = MAX_PPPOE_MTU; + lcp_wantoptions[0].mru = MAX_PPPOE_MTU; + ccp_allowoptions[0].deflate = 0 ; ccp_wantoptions[0].deflate = 0 ; @@ -431,7 +408,7 @@ struct channel pppoe_channel = { 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