X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=package%2Fnetwork%2Fservices%2Fppp%2Fpatches%2F520-uniq.patch;h=38d52dca07b313b8126436c2c46405d4e6b06af2;hb=06403981e1f2daf6bbcf05f5f2d2205d68240861;hp=65d0e96bc0ef5a98b85ae9923c4e664a6accc0cf;hpb=dc4844b18b4761a375033c34c0ffd16bc8fafd9e;p=openwrt%2Fstaging%2Flynxis.git diff --git a/package/network/services/ppp/patches/520-uniq.patch b/package/network/services/ppp/patches/520-uniq.patch index 65d0e96bc0..38d52dca07 100644 --- a/package/network/services/ppp/patches/520-uniq.patch +++ b/package/network/services/ppp/patches/520-uniq.patch @@ -147,7 +147,7 @@ strlcpy(ppp_devnam, devnam, sizeof(ppp_devnam)); --- a/pppd/plugins/rp-pppoe/pppoe-discovery.c +++ b/pppd/plugins/rp-pppoe/pppoe-discovery.c -@@ -348,7 +348,7 @@ packetIsForMe(PPPoEConnection *conn, PPP +@@ -357,7 +357,7 @@ packetIsForMe(PPPoEConnection *conn, PPP if (memcmp(packet->ethHdr.h_dest, conn->myEth, ETH_ALEN)) return 0; /* If we're not using the Host-Unique tag, then accept the packet */ @@ -156,7 +156,7 @@ parsePacket(packet, parseForHostUniq, &forMe); return forMe; -@@ -474,16 +474,12 @@ sendPADI(PPPoEConnection *conn) +@@ -495,16 +495,12 @@ sendPADI(PPPoEConnection *conn) cursor += namelen + TAG_HDR_SIZE; /* If we're using Host-Uniq, copy it over */ @@ -179,17 +179,17 @@ } packet.length = htons(plen); -@@ -645,7 +641,7 @@ int main(int argc, char *argv[]) - - memset(conn, 0, sizeof(PPPoEConnection)); +@@ -670,7 +666,7 @@ int main(int argc, char *argv[]) + conn->discoveryTimeout = PADI_TIMEOUT; + conn->discoveryAttempts = MAX_PADI_ATTEMPTS; -- while ((opt = getopt(argc, argv, "I:D:VUAS:C:h")) > 0) { -+ while ((opt = getopt(argc, argv, "I:D:VUW:AS:C:h")) > 0) { +- while ((opt = getopt(argc, argv, "I:D:VUQS:C:t:a:h")) > 0) { ++ while ((opt = getopt(argc, argv, "I:D:VUW:QS:C:t:a:h")) > 0) { switch(opt) { case 'S': conn->serviceName = xstrdup(optarg); -@@ -654,7 +650,23 @@ int main(int argc, char *argv[]) - conn->acName = xstrdup(optarg); +@@ -697,7 +693,23 @@ int main(int argc, char *argv[]) + } break; case 'U': - conn->useHostUniq = 1; @@ -222,9 +222,9 @@ +#include +#include - /* How do we access raw Ethernet devices? */ - #undef USE_LINUX_PACKET -@@ -217,7 +219,7 @@ typedef struct PPPoEConnectionStruct { + #include "pppd/pppd.h" /* For error */ + +@@ -221,7 +223,7 @@ typedef struct PPPoEConnectionStruct { char *serviceName; /* Desired service name, if any */ char *acName; /* Desired AC name, if any */ int synchronous; /* Use synchronous PPP */ @@ -233,7 +233,7 @@ int printACNames; /* Just print AC names */ FILE *debugFile; /* Debug file for dumping packets */ int numPADOs; /* Number of PADO packets received */ -@@ -273,6 +275,33 @@ void pppoe_printpkt(PPPoEPacket *packet, +@@ -278,6 +280,33 @@ void pppoe_printpkt(PPPoEPacket *packet, void (*printer)(void *, char *, ...), void *arg); void pppoe_log_packet(const char *prefix, PPPoEPacket *packet);