NDS CWs are dropped when connected to real CCCam servers
= Revision since revision 10005
= Issue Description NDS (e.g. caid 0963, 09C4, 098C) CWs are dropped due to CW half check when operating as CCCAM client and connected to CCCAM server
= When the issue occurs no picture
= How the issue is reproducable
when connected to CCCAM server (I face this issue with every public server available), I am receiving CWs, of following type:
0: XX XX XX XX XX XX XX XX 00 00 00 00 00 00 00 F0 and 1: 00 00 00 00 00 00 00 00 XX XX XX XX XX XX XX XX
the case 0: is currently always rejected by OSCAm as the code expects that last octet is 00
this is also the case when connected to a OSCAM server operating as CCCAM server
I have already verified (see patch blow), when relaxing the check and accepting in last octet an 0xF0, the channels become "clear".
--- a/oscam-ecm.c
+++ b/oscam-ecm.c
@@ -2637,8 +2637,15 @@ uint8_t checkCWpart(uchar *cw, int8_t part)
{
uint8_t eo = part ? 8 : 0;
int8_t i;
- for(i = 0; i < 8; i++)
+ for(i = 0; i < 7; i++)
if(cw[i + eo]) { return 1; }
+ if(part)
+ {
+ if(cw[i+eo] && cw[i+eo] != 0xF0) { return 1; }
+ }
+ else if(cw[i+eo])
+ return 1;
+
return 0;
}
The attached log file was created when applying following (for debugging purposes) patch additionally:
--- a/oscam-chk.c
+++ b/oscam-chk.c
@@ -1036,6 +1036,9 @@ int8_t chk_halfCW(ECM_REQUEST *er, uchar *cw)
int8_t part1 = checkCWpart(cw, 0);
int8_t part2 = checkCWpart(cw, 1);
+ char tmp[16*3+1];
+ cs_log("er->caid=%04X, cw=%s", er->caid, cs_hexdump(1, cw, 16, tmp, sizeof(tmp)));
+
//check for correct half cw format
if(part1 && part2){
return 0;