--- control.c.stopconnection 2005-10-28 13:56:20.000000000 +0200 +++ control.c 2005-11-22 11:55:28.936644216 +0100 @@ -183,6 +183,9 @@ char ip1[STRLEN]; char ip2[STRLEN]; char dummy_buf[128] = "/var/l2tp/"; /* jz: needed to read /etc/ppp/var.options - just kick it if you dont like */ + int tmptid; + int tmpcid; + if (c->msgtype < 0) { log (LOG_DEBUG, "%s: Whoa... non-ZLB with no message type!\n", @@ -668,12 +671,17 @@ __FUNCTION__); return -EINVAL; } - if ((t->qtid != t->tid) && (t->tid > 0)) + /* Work around bug in MSL2TP client */ + if ((t->firmware == 0xff00) && (strncmp(t->vendor, "Deterministic Networks Inc.", 27) == 0)) + tmptid = t->ourtid; + else + tmptid = t->tid; + if ((t->qtid != tmptid) && (tmptid > 0)) { if (DEBUG) log (LOG_DEBUG, "%s: Peer tried to disconnect with invalid TID (%d != %d)\n", - __FUNCTION__, t->qtid, t->tid); + __FUNCTION__, t->qtid, tmptid); return -EINVAL; } /* In case they're disconnecting immediately after SCCN */ @@ -1071,7 +1079,12 @@ } else p = c; - if ((c->qcid != p->cid) && p->cid > 0) + /* Work around bug in MSL2TP client */ + if ((t->firmware == 0xff00) && (strncmp(t->vendor, "Deterministic Networks Inc.", 27) == 0)) + tmpcid = p->ourcid; + else + tmpcid = p->cid; + if ((c->qcid != tmpcid) && tmpcid > 0) { if (DEBUG) log (LOG_DEBUG,