Only in rp-pppoe-3.10+sa: .auto-nanorc diff -r -U4 rp-pppoe-3.10/src/pppoe.h rp-pppoe-3.10+sa/src/pppoe.h --- rp-pppoe-3.10/src/pppoe.h 2008-06-30 15:00:43.000000000 +0100 +++ rp-pppoe-3.10+sa/src/pppoe.h 2010-05-02 12:33:57.000000000 +0100 @@ -179,8 +179,9 @@ #define TAG_HOST_UNIQ 0x0103 #define TAG_AC_COOKIE 0x0104 #define TAG_VENDOR_SPECIFIC 0x0105 #define TAG_RELAY_SESSION_ID 0x0110 +#define TAG_PPP_MAX_PAYLOAD 0x0120 #define TAG_SERVICE_NAME_ERROR 0x0201 #define TAG_AC_SYSTEM_ERROR 0x0202 #define TAG_GENERIC_ERROR 0x0203 diff -r -U4 rp-pppoe-3.10/src/pppoe-server.c rp-pppoe-3.10+sa/src/pppoe-server.c --- rp-pppoe-3.10/src/pppoe-server.c 2008-06-30 15:00:43.000000000 +0100 +++ rp-pppoe-3.10+sa/src/pppoe-server.c 2010-05-02 12:53:38.000000000 +0100 @@ -57,8 +57,10 @@ #include #include +#include + #ifdef HAVE_LICENSE #include "license.h" #include "licensed-only/servfuncs.h" static struct License const *ServerLicense; @@ -685,8 +687,21 @@ plen += TAG_HDR_SIZE+slen; } } + /* Add our maximum MRU */ + { + PPPoETag maxPayload; + UINT16_t mru = htons(ethif->mru); + maxPayload.type = htons(TAG_PPP_MAX_PAYLOAD); + maxPayload.length = htons(sizeof(mru)); + memcpy(maxPayload.payload, &mru, sizeof(mru)); + CHECK_ROOM(cursor, pado.payload, sizeof(mru) + TAG_HDR_SIZE); + memcpy(cursor, &maxPayload, sizeof(mru) + TAG_HDR_SIZE); + cursor += sizeof(mru) + TAG_HDR_SIZE; + plen += sizeof(mru) + TAG_HDR_SIZE; + } + CHECK_ROOM(cursor, pado.payload, TAG_HDR_SIZE + COOKIE_LEN); memcpy(cursor, &cookie, TAG_HDR_SIZE + COOKIE_LEN); cursor += TAG_HDR_SIZE + COOKIE_LEN; plen += TAG_HDR_SIZE + COOKIE_LEN; @@ -988,8 +1003,20 @@ memcpy(cursor, &hostUniq, ntohs(hostUniq.length) + TAG_HDR_SIZE); cursor += ntohs(hostUniq.length) + TAG_HDR_SIZE; plen += ntohs(hostUniq.length) + TAG_HDR_SIZE; } + /* Add our maximum MRU */ + { + PPPoETag maxPayload; + UINT16_t mru = htons(ethif->mru); + maxPayload.type = htons(TAG_PPP_MAX_PAYLOAD); + maxPayload.length = htons(sizeof(mru)); + memcpy(maxPayload.payload, &mru, sizeof(mru)); + CHECK_ROOM(cursor, pads.payload, sizeof(mru) + TAG_HDR_SIZE); + memcpy(cursor, &maxPayload, sizeof(mru) + TAG_HDR_SIZE); + cursor += sizeof(mru) + TAG_HDR_SIZE; + plen += sizeof(mru) + TAG_HDR_SIZE; + } pads.length = htons(plen); sendPacket(NULL, sock, &pads, (int) (plen + HDR_SIZE)); /* Close sock; don't need it any more */ @@ -1460,9 +1487,32 @@ } /* Open all the interfaces */ for (i=0; i