]> git.ozlabs.org Git - ppp.git/commitdiff
Remove send/recv_config_pppoa
authorPaul Mackerras <paulus@samba.org>
Mon, 23 Jun 2008 12:27:39 +0000 (12:27 +0000)
committerPaul Mackerras <paulus@samba.org>
Mon, 23 Jun 2008 12:27:39 +0000 (12:27 +0000)
Plugins have no business to be setting the ppp interface mtu.
The send/recv_config functions are only meant to set the channel
mtu/mru, not the ppp interface mtu/mru.

pppd/plugins/pppoatm/pppoatm.c

index 6621cba8d384c234da55086ebbc5de6b5c67aa5a..7712c6d8fdd79ad9787c0902179ca715e63d6d10 100644 (file)
@@ -168,34 +168,6 @@ static void disconnect_pppoatm(void)
        close(pppoa_fd);
 }
 
-static void send_config_pppoa(int mtu,
-                             u_int32_t asyncmap,
-                             int pcomp,
-                             int accomp)
-{
-       int sock;
-       struct ifreq ifr;
-       if (mtu > pppoatm_max_mtu)
-               error("Couldn't increase MTU to %d", mtu);
-       sock = socket(AF_INET, SOCK_DGRAM, 0);
-       if (sock < 0)
-               fatal("Couldn't create IP socket: %m");
-       strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
-       ifr.ifr_mtu = mtu;
-       if (ioctl(sock, SIOCSIFMTU, (caddr_t) &ifr) < 0)
-               fatal("ioctl(SIOCSIFMTU): %m");
-       (void) close (sock);
-}
-
-static void recv_config_pppoa(int mru,
-                             u_int32_t asyncmap,
-                             int pcomp,
-                             int accomp)
-{
-       if (mru > pppoatm_max_mru)
-               error("Couldn't increase MRU to %d", mru);
-}
-
 void plugin_init(void)
 {
 #if defined(__linux__)
@@ -217,8 +189,8 @@ struct channel pppoa_channel = {
     disconnect: &disconnect_pppoatm,
     establish_ppp: &generic_establish_ppp,
     disestablish_ppp: &generic_disestablish_ppp,
-    send_config: &send_config_pppoa,
-    recv_config: &recv_config_pppoa,
+    send_config: NULL,
+    recv_config: NULL,
     close: NULL,
     cleanup: NULL
 };