diff -r -U4 rp-l2tp-0.4/l2tp.h rp-l2tp-0.4+speed/l2tp.h --- rp-l2tp-0.4/l2tp.h 2004-07-01 15:58:55.000000000 +0100 +++ rp-l2tp-0.4+speed/l2tp.h 2009-11-04 19:34:42.000000000 +0000 @@ -97,8 +97,9 @@ int holdoff; /* If persist is true, delay after which the session is re-established. */ int maxfail; /* If persist is true, try to establish a broken session at most on maxfail times. */ + int speed; /* Connection speed */ int fail; /* Number of failed attempts. */ } l2tp_peer; /* An L2TP tunnel */ diff -r -U4 rp-l2tp-0.4/peer.c rp-l2tp-0.4+speed/peer.c --- rp-l2tp-0.4/peer.c 2004-07-01 15:58:55.000000000 +0100 +++ rp-l2tp-0.4+speed/peer.c 2009-11-04 19:34:37.000000000 +0000 @@ -58,8 +58,9 @@ { "retain-tunnel", OPT_TYPE_BOOL, &prototype.retain_tunnel}, { "persist", OPT_TYPE_BOOL, &prototype.persist}, { "holdoff", OPT_TYPE_INT, &prototype.holdoff}, { "maxfail", OPT_TYPE_INT, &prototype.maxfail}, + { "speed", OPT_TYPE_INT, &prototype.speed}, { "strict-ip-check", OPT_TYPE_BOOL, &prototype.validate_peer_ip}, { NULL, OPT_TYPE_BOOL, NULL } }; @@ -282,8 +283,9 @@ peer->retain_tunnel = prototype.retain_tunnel; peer->persist = prototype.persist; peer->holdoff = prototype.holdoff; peer->maxfail = prototype.maxfail; + peer->speed = prototype.speed; peer->fail = 0; peer->validate_peer_ip = prototype.validate_peer_ip; return 0; } diff -r -U4 rp-l2tp-0.4/session.c rp-l2tp-0.4+speed/session.c --- rp-l2tp-0.4/session.c 2004-07-01 15:58:55.000000000 +0100 +++ rp-l2tp-0.4+speed/session.c 2009-11-04 19:36:21.000000000 +0000 @@ -562,9 +562,9 @@ /* TODO: Speed, etc. are faked for now. */ /* Connect speed */ - u32 = htonl(57600); + u32 = htonl(tunnel->peer->speed); l2tp_dgram_add_avp(dgram, tunnel, MANDATORY, sizeof(u32), VENDOR_IETF, AVP_TX_CONNECT_SPEED, &u32); /* Framing Type */