l2tpd_packet: first packet already count, set the l2c->next_rx_seq_nr = 1
This commit is contained in:
parent
4a043b76d5
commit
15ef36a217
|
@ -448,6 +448,7 @@ static int rx_scc_rq(struct msgb *msg, struct avps_parsed *ap)
|
||||||
if (host_name)
|
if (host_name)
|
||||||
l2cc->remote.host_name = talloc_strdup(l2cc, host_name);
|
l2cc->remote.host_name = talloc_strdup(l2cc, host_name);
|
||||||
memcpy(&l2cc->remote.ss, sockaddr, sizeof(*sockaddr));
|
memcpy(&l2cc->remote.ss, sockaddr, sizeof(*sockaddr));
|
||||||
|
l2cc->next_rx_seq_nr = 1;
|
||||||
} else {
|
} else {
|
||||||
LOGP(DL2TP, LOGL_ERROR, "Received a SCCRQ with control id != 0: %d\n", ch->ccid);
|
LOGP(DL2TP, LOGL_ERROR, "Received a SCCRQ with control id != 0: %d\n", ch->ccid);
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -661,6 +662,8 @@ static int l2tp_rcvmsg_control(struct msgb *msg)
|
||||||
}
|
}
|
||||||
msg_type = osmo_load16be(first_avp->data);
|
msg_type = osmo_load16be(first_avp->data);
|
||||||
|
|
||||||
|
/* FIXME: we need to get the l2c here to count the rx */
|
||||||
|
|
||||||
if (first_avp->vendor_id == VENDOR_IETF &&
|
if (first_avp->vendor_id == VENDOR_IETF &&
|
||||||
first_avp->type == AVP_IETF_CTRL_MSG)
|
first_avp->type == AVP_IETF_CTRL_MSG)
|
||||||
return l2tp_rcvmsg_control_ietf(msg, &ap, msg_type);
|
return l2tp_rcvmsg_control_ietf(msg, &ap, msg_type);
|
||||||
|
|
Loading…
Reference in New Issue