- fixed - UBRB: library can't work at the same time with URCB with preconfigured client and URCB without preconfigured client (LIB61850-292)(#355)

pull/331/merge
Michael Zillgith 4 years ago
parent 32087c47de
commit aaf893da34

@ -48,6 +48,7 @@ option(CONFIG_IEC61850_LOG_SERVICE "Build with support for IEC 61850 logging ser
option(CONFIG_IEC61850_SERVICE_TRACKING "Build with support for IEC 61850 service tracking" ON)
option(CONFIG_IEC61850_SETTING_GROUPS "Build with support for IEC 61850 setting group services" ON)
option(CONFIG_IEC61850_SUPPORT_USER_READ_ACCESS_CONTROL "Allow user provided callback to control read access" ON)
option(CONFIG_IEC61850_RCB_ALLOW_ONLY_PRECONFIGURED_CLIENT "allow only configured clients (when pre-configured by ClientLN)" OFF)
set(CONFIG_REPORTING_DEFAULT_REPORT_BUFFER_SIZE "65536" CACHE STRING "Default buffer size for buffered reports in byte" )

@ -137,7 +137,7 @@
#define CONFIG_IEC61850_BRCB_WITH_RESVTMS 1
/* allow only configured clients (when pre-configured by ClientLN) - note behavior in PIXIT Rp13 */
#define CONFIG_IEC61850_RCB_ALLOW_ONLY_PRECONFIGURED_CLIENT 0
#cmakedefine01 CONFIG_IEC61850_RCB_ALLOW_ONLY_PRECONFIGURED_CLIENT
/* The default buffer size of buffered RCBs in bytes */
#cmakedefine CONFIG_REPORTING_DEFAULT_REPORT_BUFFER_SIZE @CONFIG_REPORTING_DEFAULT_REPORT_BUFFER_SIZE@

@ -1732,17 +1732,18 @@ Reporting_RCBWriteAccessHandler(MmsMapping* self, ReportControl* rc, char* eleme
}
#if (CONFIG_IEC61850_RCB_ALLOW_ONLY_PRECONFIGURED_CLIENT == 1)
if (isIpAddressMatchingWithOwner(rc, MmsServerConnection_getClientAddress(connection)) == false) {
retVal = DATA_ACCESS_ERROR_OBJECT_ACCESS_DENIED;
if (rc->resvTms == -1) {
if (isIpAddressMatchingWithOwner(rc, MmsServerConnection_getClientAddress(connection)) == false) {
retVal = DATA_ACCESS_ERROR_OBJECT_ACCESS_DENIED;
if (DEBUG_IED_SERVER)
printf("IED_SERVER: client IP not matching with pre-assigned owner --> write access denied!\n");
if (DEBUG_IED_SERVER)
printf("IED_SERVER: client IP not matching with pre-assigned owner --> write access denied!\n");
goto exit_function;
goto exit_function;
}
}
#endif
if (strcmp(elementName, "RptEna") == 0) {
if (value->value.boolean == true) {

@ -101,6 +101,9 @@ MmsValue_newUnsignedFromBerInteger(Asn1PrimitiveValue* berInteger)
bool
MmsValue_equals(const MmsValue* self, const MmsValue* otherValue)
{
if ((self == NULL) || (otherValue == NULL))
return false;
if (self->type == otherValue->type) {
switch (self->type)
{

Loading…
Cancel
Save