- GOOSE subscriber: accept GOOSE messages with the correct maximum size of DatSet and GoID

pull/291/head
Michael Zillgith 5 years ago
parent b88c4216c8
commit 7b671f3a01

@ -662,12 +662,12 @@ parseGoosePayload(GooseReceiver self, uint8_t* buffer, int apduLength)
break; break;
case 0x82: case 0x82: /* DatSet */
if (DEBUG_GOOSE_SUBSCRIBER) if (DEBUG_GOOSE_SUBSCRIBER)
printf("GOOSE_SUBSCRIBER: Found dataSet\n"); printf("GOOSE_SUBSCRIBER: Found dataSet\n");
{ {
if (matchingSubscriber) { if (matchingSubscriber) {
if (elementLength > 64) { if (elementLength > 129) {
if (DEBUG_GOOSE_SUBSCRIBER) if (DEBUG_GOOSE_SUBSCRIBER)
printf("GOOSE_SUBSCRIBER: datSet too long!\n"); printf("GOOSE_SUBSCRIBER: datSet too long!\n");
} }
@ -679,12 +679,12 @@ parseGoosePayload(GooseReceiver self, uint8_t* buffer, int apduLength)
} }
break; break;
case 0x83: case 0x83: /* GoID **/
if (DEBUG_GOOSE_SUBSCRIBER) if (DEBUG_GOOSE_SUBSCRIBER)
printf("GOOSE_SUBSCRIBER: Found goId\n"); printf("GOOSE_SUBSCRIBER: Found goId\n");
{ {
if (matchingSubscriber) { if (matchingSubscriber) {
if (elementLength > 64) { if (elementLength > 65) {
if (DEBUG_GOOSE_SUBSCRIBER) if (DEBUG_GOOSE_SUBSCRIBER)
printf("GOOSE_SUBSCRIBER: goId too long!\n"); printf("GOOSE_SUBSCRIBER: goId too long!\n");
} }

@ -36,8 +36,8 @@
struct sGooseSubscriber { struct sGooseSubscriber {
char goCBRef[130]; char goCBRef[130];
char datSet[65]; char datSet[130];
char goId[65]; char goId[66];
int goCBRefLen; int goCBRefLen;
uint32_t timeAllowedToLive; uint32_t timeAllowedToLive;
uint32_t stNum; uint32_t stNum;

@ -2136,8 +2136,8 @@ Control_writeAccessControlObject(MmsMapping* self, MmsDomain* domain, char* vari
(controlObject->synchroCheck == synchroCheck) (controlObject->synchroCheck == synchroCheck)
) == false) ) == false)
{ {
indication = DATA_ACCESS_ERROR_TYPE_INCONSISTENT; indication = DATA_ACCESS_ERROR_TYPE_INCONSISTENT;
ControlObject_sendLastApplError(controlObject, connection, "Oper", ControlObject_sendLastApplError(controlObject, connection, "Oper",
CONTROL_ERROR_NO_ERROR, ADD_CAUSE_INCONSISTENT_PARAMETERS, CONTROL_ERROR_NO_ERROR, ADD_CAUSE_INCONSISTENT_PARAMETERS,
ctlNum, origin, true); ctlNum, origin, true);

Loading…
Cancel
Save