***********************************************************************/
static char const RCSID[] =
-"$Id: plugin.c,v 1.7 2002/04/02 13:11:00 dfs Exp $";
+"$Id: plugin.c,v 1.8 2003/03/04 05:21:38 fcusack Exp $";
#define _GNU_SOURCE 1
#include "pppoe.h"
return conn->sessionSocket;
}
-static void
+static int
PPPOESendConfig(int mtu,
u_int32_t asyncmap,
int pcomp,
}
sock = socket(AF_INET, SOCK_DGRAM, 0);
if (sock < 0) {
- fatal("Couldn't create IP socket: %m");
+ error("Couldn't create IP socket: %m");
+ return -1;
}
strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
ifr.ifr_mtu = mtu;
if (ioctl(sock, SIOCSIFMTU, &ifr) < 0) {
- fatal("ioctl(SIOCSIFMTU): %m");
+ error("ioctl(SIOCSIFMTU): %m");
+ return -1;
}
(void) close (sock);
+ return 0;
}
-static void
+static int
PPPOERecvConfig(int mru,
u_int32_t asyncmap,
int pcomp,
{
if (mru > MAX_PPPOE_MTU) {
error("Couldn't increase MRU to %d", mru);
+ return -1;
}
+ return 0;
}
/**********************************************************************