summaryrefslogtreecommitdiff
path: root/accel-pppd
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd')
-rw-r--r--accel-pppd/ctrl/pppoe/pppoe.c4
-rw-r--r--accel-pppd/shaper/tc_core.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/accel-pppd/ctrl/pppoe/pppoe.c b/accel-pppd/ctrl/pppoe/pppoe.c
index 4f99354..11a6ea1 100644
--- a/accel-pppd/ctrl/pppoe/pppoe.c
+++ b/accel-pppd/ctrl/pppoe/pppoe.c
@@ -989,7 +989,7 @@ static void pppoe_recv_PADI(struct pppoe_serv_t *serv, uint8_t *pack, int size)
if (conf_service_name[0]) {
int svc_index = 0;
do {
- if (ntohs(tag->tag_len) == strlen(conf_service_name[svc_index]) &&
+ if (ntohs(tag->tag_len) == strlen(conf_service_name[svc_index]) &&
memcmp(tag->tag_data, conf_service_name[svc_index], ntohs(tag->tag_len)) == 0) {
service_match = 1;
break;
@@ -1126,7 +1126,7 @@ static void pppoe_recv_PADR(struct pppoe_serv_t *serv, uint8_t *pack, int size)
else if (conf_service_name[0]) {
int svc_index = 0;
do {
- if (ntohs(tag->tag_len) == strlen(conf_service_name[svc_index]) &&
+ if (ntohs(tag->tag_len) == strlen(conf_service_name[svc_index]) &&
memcmp(tag->tag_data, conf_service_name[svc_index], ntohs(tag->tag_len)) == 0) {
service_match = 1;
break;
diff --git a/accel-pppd/shaper/tc_core.h b/accel-pppd/shaper/tc_core.h
index cb85cc4..e38b579 100644
--- a/accel-pppd/shaper/tc_core.h
+++ b/accel-pppd/shaper/tc_core.h
@@ -6,6 +6,10 @@
#define TIME_UNITS_PER_SEC 1000000
+#ifndef UINT16_MAX
+#define UINT16_MAX 65535
+#endif
+
enum link_layer {
LINKLAYER_UNSPEC,
LINKLAYER_ETHERNET,