summaryrefslogtreecommitdiff
path: root/accel-pptpd/ctrl/pppoe/pppoe.h
diff options
context:
space:
mode:
authorKozlov Dmitry <dima@server>2010-12-06 16:57:48 +0300
committerKozlov Dmitry <dima@server>2010-12-06 16:57:48 +0300
commitbdf38bdf25400e175d8b20c087c9919199fe8b6e (patch)
tree46a2c2b3f3a60a40d802a166130d5013dd8dd1ab /accel-pptpd/ctrl/pppoe/pppoe.h
parent96c532726a1f9434b8b1da16cea64a9c00291c59 (diff)
downloadaccel-ppp-xebd-bdf38bdf25400e175d8b20c087c9919199fe8b6e.tar.gz
accel-ppp-xebd-bdf38bdf25400e175d8b20c087c9919199fe8b6e.zip
pppoe: changed cookie generation procedure and PADR handling procedure to avoid PADR flood
Diffstat (limited to 'accel-pptpd/ctrl/pppoe/pppoe.h')
-rw-r--r--accel-pptpd/ctrl/pppoe/pppoe.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/accel-pptpd/ctrl/pppoe/pppoe.h b/accel-pptpd/ctrl/pppoe/pppoe.h
index 91c8d30..5db3a49 100644
--- a/accel-pptpd/ctrl/pppoe/pppoe.h
+++ b/accel-pptpd/ctrl/pppoe/pppoe.h
@@ -2,6 +2,9 @@
#define __PPPOE_H
#include <pthread.h>
+
+#include <openssl/des.h>
+
#include <linux/if.h>
#include <linux/if_pppox.h>
@@ -39,6 +42,8 @@
#define MAX_PPPOE_MTU (MAX_PPPOE_PAYLOAD - 2)
#define MAX_SID 65534
+#define SECRET_LENGTH 16
+#define COOKIE_LENGTH 24
struct pppoe_tag_t
{
@@ -64,6 +69,9 @@ struct pppoe_serv_t
uint8_t hwaddr[ETH_ALEN];
char *ifname;
+ uint8_t secret[SECRET_LENGTH];
+ DES_key_schedule des_ks;
+
pthread_mutex_t lock;
struct pppoe_conn_t *conn[MAX_SID];
uint16_t sid;