bankd: Ignore IPA CCM and don't terminate if we receive it

The IPA multiplex has a built-in sub-protocol called "CCM", which
we are not implemnting so far.  We still don't implement it, but
at least we don't terminate the TCP connection anymore if any such
unsupported IPA CCM is received.

Change-Id: Ibf7bf2aa973c3f7503479c35adfdc135d7165618
This commit is contained in:
Harald Welte 2018-10-11 12:56:21 +02:00
parent f1d7016397
commit 5a3613a57f
1 changed files with 6 additions and 1 deletions

View File

@ -473,11 +473,16 @@ static int worker_transceive_loop(struct bankd_worker *worker)
data_len = rc;
hh = (struct ipaccess_head *) buf;
if (hh->proto != IPAC_PROTO_OSMO) {
if (hh->proto != IPAC_PROTO_OSMO && hh->proto != IPAC_PROTO_IPACCESS) {
LOGW(worker, "Received unsupported IPA protocol != OSMO: 0x%02x\n", hh->proto);
return -4;
}
if (hh->proto == IPAC_PROTO_IPACCESS) {
LOGW(worker, "IPA CCM not implemented yet\n");
return 0;
}
hh_ext = (struct ipaccess_head_ext *) buf + sizeof(*hh);
if (data_len < sizeof(*hh_ext)) {
LOGW(worker, "Received short message\n");