You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
1.8 KiB
Diff
71 lines
1.8 KiB
Diff
--- rp-pppoe/src/discovery.c
|
|
+++ rp-pppoe/src/discovery.c
|
|
@@ -38,9 +38,9 @@
|
|
#define HAVE_STDARG_H 1
|
|
#define HAVE_STDBOOL_H 1
|
|
#define HAVE_STDDEF_H 1
|
|
-#include "pppd/pppd.h"
|
|
-#include "pppd/fsm.h"
|
|
-#include "pppd/lcp.h"
|
|
+#include "../../pppd/pppd/pppd.h"
|
|
+#include "../../pppd/pppd/fsm.h"
|
|
+#include "../../pppd/pppd/lcp.h"
|
|
|
|
#ifdef PPPD_VERSION
|
|
/* New-style pppd API */
|
|
--- rp-pppoe/src/plugin.c
|
|
+++ rp-pppoe/src/plugin.c
|
|
@@ -64,7 +64,7 @@
|
|
#define _ROOT_PATH ""
|
|
#endif
|
|
|
|
-#define _PATH_ETHOPT _ROOT_PATH "/etc/ppp/options."
|
|
+#define _PATH_ETHOPT _ROOT_PATH "/ppp/options."
|
|
|
|
#ifdef PPPD_VERSION
|
|
/* Handle new-style (as of pppd 2.5) API */
|
|
@@ -86,6 +86,9 @@
|
|
/* From sys-linux.c in pppd -- MUST FIX THIS! */
|
|
extern int new_style_driver;
|
|
|
|
+/* Supplied by pppd */
|
|
+extern int debug;
|
|
+
|
|
char *pppd_pppoe_service = NULL;
|
|
static char *acName = NULL;
|
|
static char *existingSession = NULL;
|
|
@@ -301,7 +304,7 @@
|
|
struct ifreq ifr;
|
|
|
|
if (mtu > MAX_PPPOE_MTU) {
|
|
- warn("Couldn't increase MTU to %d", mtu);
|
|
+ if (debug) warn("Couldn't increase MTU to %d", mtu);
|
|
mtu = MAX_PPPOE_MTU;
|
|
}
|
|
sock = socket(AF_INET, SOCK_DGRAM, 0);
|
|
@@ -325,7 +328,7 @@
|
|
int pcomp,
|
|
int accomp)
|
|
{
|
|
- if (mru > MAX_PPPOE_MTU) {
|
|
+ if (mru > MAX_PPPOE_MTU && debug) {
|
|
warn("Couldn't increase MRU to %d", mru);
|
|
}
|
|
}
|
|
--- rp-pppoe/src/relay.c
|
|
+++ rp-pppoe/src/relay.c
|
|
@@ -940,10 +940,11 @@
|
|
SessionHash *sh;
|
|
PPPoESession *ses;
|
|
|
|
- /* Destination address must be interface's MAC address */
|
|
- if (memcmp(packet->ethHdr.h_dest, iface->mac, ETH_ALEN)) {
|
|
+ /* Ignore PADT packets whose destination address isn't ours */
|
|
+ if (!(packet->ethHdr.h_dest[0] & 0xfe) &&
|
|
+ memcmp(packet->ethHdr.h_dest, iface->mac, ETH_ALEN)) {
|
|
return;
|
|
}
|
|
|
|
sh = findSession(packet->ethHdr.h_source, packet->session);
|
|
if (!sh) {
|