diff options
author | Kozlov Dmitry <dima@server> | 2011-05-10 11:23:09 +0400 |
---|---|---|
committer | Kozlov Dmitry <dima@server> | 2011-05-10 11:23:09 +0400 |
commit | cac666a65bef987c6004acb70bb17c0393cc335f (patch) | |
tree | d343f555f01f2605d9de4666e7181a8886101a16 /accel-pppd/ctrl | |
parent | c5d84b6ea2df1bde706d08065bea656a676cd290 (diff) | |
download | accel-ppp-cac666a65bef987c6004acb70bb17c0393cc335f.tar.gz accel-ppp-cac666a65bef987c6004acb70bb17c0393cc335f.zip |
l2tp: dir300 quirk
Diffstat (limited to 'accel-pppd/ctrl')
-rw-r--r-- | accel-pppd/ctrl/l2tp/l2tp.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c index ca56051b..8dcfb400 100644 --- a/accel-pppd/ctrl/l2tp/l2tp.c +++ b/accel-pppd/ctrl/l2tp/l2tp.c @@ -48,6 +48,7 @@ int conf_timeout = 60; int conf_rtimeout = 5; int conf_retransmit = 5; int conf_hello_interval = 60; +int conf_dir300_quirk = 0; char *conf_host_name = NULL; static unsigned int stat_active; @@ -838,7 +839,7 @@ static int l2tp_conn_read(struct triton_md_handler_t *h) if (!pack) continue; - if (ntohs(pack->hdr.tid) != conn->tid) { + if (ntohs(pack->hdr.tid) != conn->tid && (pack->hdr.tid || !conf_dir300_quirk)) { if (conf_verbose) log_warn("l2tp: incorrect tid %i in tunnel %i\n", ntohs(pack->hdr.tid), conn->tid); l2tp_packet_free(pack); @@ -1121,6 +1122,10 @@ static void load_config(void) conf_host_name = _strdup(opt); else conf_host_name = NULL; + + opt = conf_get_opt("l2tp", "dir300_quirk"); + if (opt) + conf_dir300_quirk = atoi(opt); } static void __init l2tp_init(void) |