l2tp_packet: dont answer an ACK with a StopCCN if connection is unknown

as long we don't do real ack handling, just ignore ACK without connection, because
on a StopCCN an ACK is sent out
This commit is contained in:
Alexander Couzens 2016-11-11 16:19:19 +01:00
parent 9143daf21e
commit eb07d89ffc
1 changed files with 7 additions and 1 deletions

View File

@ -851,7 +851,13 @@ static int l2tp_rcvmsg_control(struct msgb *msg)
l2c = l2tpd_cc_find_by_l_cc_id(l2i, ch->ccid);
if (!l2c) {
LOGP(DL2TP, LOGL_ERROR, "l2tp: can not find a connection for ccid %d\n", ch->ccid);
l2tp_tx_stop_ccn_msg(msg);
/* ignore acks */
if (first_avp->vendor_id != VENDOR_IETF ||
first_avp->type != AVP_IETF_CTRL_MSG ||
msg_type != IETF_CTRLMSG_ACK) {
l2tp_tx_stop_ccn_msg(msg);
}
return -1;
}