diff options
author | Guillaume Nault <g.nault@alphalink.fr> | 2014-01-16 21:24:17 +0100 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2014-01-17 15:35:27 +0400 |
commit | cbebd3b97616ea25e7ee197d5412b4baead0399f (patch) | |
tree | fb4e75913d7f4f13bd871b9c676433df3f94e25b | |
parent | 1de8f3bea7317551413e5dec1a9daa420436c769 (diff) | |
download | accel-ppp-cbebd3b97616ea25e7ee197d5412b4baead0399f.tar.gz accel-ppp-cbebd3b97616ea25e7ee197d5412b4baead0399f.zip |
pppoe: fix Minimum-Data-Rate-Downstream TR101 sub-tag handling
As per TR-101 specifications and RFC 4679, 0x84 is the sub-tag
number for Minimum-Data-Rate-Downstream (instead of
Maximum-Data-Rate-Upstream).
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
-rw-r--r-- | accel-pppd/ctrl/pppoe/tr101.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/accel-pppd/ctrl/pppoe/tr101.c b/accel-pppd/ctrl/pppoe/tr101.c index 2b48e51..5a56e7f 100644 --- a/accel-pppd/ctrl/pppoe/tr101.c +++ b/accel-pppd/ctrl/pppoe/tr101.c @@ -16,7 +16,7 @@ #define OPT_ACTUAL_DATA_RATE_UP 0x81 #define OPT_ACTUAL_DATA_RATE_DOWN 0x82 #define OPT_MIN_DATA_RATE_UP 0x83 -#define OPT_MAX_DATA_RATE_DOWN 0x84 +#define OPT_MIN_DATA_RATE_DOWN 0x84 static int tr101_send_request(struct pppoe_tag *tr101, struct rad_packet_t *pack, int type) { @@ -69,10 +69,10 @@ static int tr101_send_request(struct pppoe_tag *tr101, struct rad_packet_t *pack if (rad_packet_add_int(pack, "ADSL-Forum", "Minimum-Data-Rate-Upstream", ntohl(*(uint32_t *)ptr))) return -1; break; - case OPT_MAX_DATA_RATE_DOWN: + case OPT_MIN_DATA_RATE_DOWN: if (len != 6) goto inval; - if (rad_packet_add_int(pack, "ADSL-Forum", "Maximum-Data-Rate-Upstream", ntohl(*(uint32_t *)ptr))) + if (rad_packet_add_int(pack, "ADSL-Forum", "Minimum-Data-Rate-Downstream", ntohl(*(uint32_t *)ptr))) return -1; break; } |