Commit Graph

103 Commits (53d8a2f71543f8522e73d5c413b95194b9de7a22)

Author SHA1 Message Date
Michael Zillgith 53d8a2f715 - IED server: changed types TrkOps and OptFlds to variable length bit strings 5 years ago
Michael Zillgith e4fcb923a0 - fixed problems in control service tracking 5 years ago
Michael Zillgith 42802db6f1 - added -Wextra to Makefile and changed code to avoid resulting warnings 5 years ago
Michael Zillgith 07525b598f Merge branch 'v1.5' of https://github.com/mz-automation/libiec61850 into v1.5 5 years ago
Michael Zillgith 1f56110d32 - removed some compiler warnings 5 years ago
Mikael Bourhis a095c16139 IED Server/Goose: Fix the 'Goose Ethernet Interface Id' allocation
Issue:
In the case of 'GooseInterfaceId' initialization for all GOOSE
publishers (API function: IedServer_setGooseInterfaceId()), only the pointer of
the character string is saved and used for the next operations.
If the corresponding memory is cleared or overwritten in the
application program, a segfault may occurred in libiec61850.

Proof:
In the 'server_example_goose.c' example, if we used a temporary
allocated memory to store the 'ethernetIfcId', the bug will occur:

        /* set GOOSE interface for all GOOSE publishers (GCBs) */
    +   unsigned int ethernet_interface_id_length = strnlen(ethernetIfcID, 32);
    +   char * tmp_ethernet_interface_id = calloc(sizeof(char), ethernet_interface_id_length + 1);
    +   memcpy(tmp_ethernet_interface_id, ethernetIfcID, ethernet_interface_id_length);
    +
        IedServer_setGooseInterfaceId(iedServer, tmp_ethernet_interface_id);
    +
    +   explicit_bzero(tmp_ethernet_interface_id, ethernet_interface_id_length);
    +   free(tmp_ethernet_interface_id);

(This issue was discovered during the rewriting of 'server_example_goose'
in Python, with the Swig wrapper: the allocated memory for
'ethernetIfcID' parameter in the Swig wrapper is automatically reused)

Fix:
The 'gooseInterfaceId' attribute of 'MmsMapping' in libiec61850 must be a new
allocated memory (with the use of 'StringUtils_copyString()') and deallocated
in the 'MmsMapping_destroy()' function.
5 years ago
Michael Zillgith ec5ccb62a0 - IED server: RCB and LCB service tracking replaced $ with . characters in object references 5 years ago
Michael Zillgith 7e1c2ef18f - IED server: added GoCB event callback
- IED server: added configuration option to use GoCB block handling without the integrated GOOSE publisher (IedServerConfig_useIntegratedGoosePublisher)
5 years ago
Michael Zillgith e1ab323c1b - IED server: added code for log service tracking 5 years ago
Michael Zillgith 3a2eea3611 - extended service tracking example for GoCB and SGCB service tracking 5 years ago
Michael Zillgith fcdb83bc2f - IED server: fixed memory leak in service tracking code
- IED server: fixed bug in GoCB service tracking (goID and dataSet not set)
5 years ago
Michael Zillgith 0b58716ea3 - IED server: fixed issue - read access to SGCB is not possible when read access handler is installed 5 years ago
Michael Zillgith ed8c8b3ac7 - IEC 61850 server: fixed some variable initialization issues caused by recent changes 5 years ago
Michael Zillgith e4b2849894 - fixed problems in handling array elements and array element components 5 years ago
Michael Zillgith 9ab37e9836 - IED Server/GOOSE: Don't send GOOSE message with new event while data model is locked 5 years ago
Michael Zillgith 649db2b3d6 - IEC 61850 server: extended control service tracking
- IEC 61850 server: partially implemented setting group service tracking
- IEC 61850 server: partially implemented GoCB service tracking
5 years ago
Michael Zillgith 80d11fbf78 - IEC 61850 server: started to implement control service tracking
(implemented support for SpcTrk)
5 years ago
Michael Zillgith 2f5817e0ac - IEC 61850 server: implemented service tracking for BRCBs and URCBs 5 years ago
Michael Zillgith b3c5ecdcf2 - IEC 61850 server: report service - combine quality and value change of a FCDO in the same report when model is locked (send data set entry with multiple reason-for-inclusion) 5 years ago
Michael Zillgith 73f1a98b4a Merge branch 'v1.4' into v1.5 5 years ago
Michael Zillgith cc08420e50 - IEC 61850 server: fixed problem with logging when log data set contains FCDO (#225) 5 years ago
Michael Zillgith 4a15e9987b - IEC 61850 server: fixed compilation error in single thread mode 5 years ago
Michael Zillgith f4957cf62a - IEC 61850 server: wait for background thread termination before data model is released 5 years ago
Michael Zillgith 29efa333f8 - IEC 61850 server: allow server to start without logical devices in data model (#218) 6 years ago
Michael Zillgith d86055173d - IEC 61850 server: control models - allow delaying select response with check handler (new handler return value CONTROL_WAITING_FOR_SELECT) 6 years ago
Michael Zillgith abcf93416f - added function IedServer_getNumberOfOpenConnections
- IEC 61850/MMS server: refactored connection handling
6 years ago
Michael Zillgith 18c2e30f87 - IEC 61850 server: refactored reporting module; unbuffered reports are stored to report buffer and sent by connection handling thread 6 years ago
Michael Zillgith 6b2404e80b - GOOSE: option to enable/disable VLAN tagging
- IED Server: Allow setting different interfaces for different GOOSE publishers
6 years ago
Michael Zillgith 2e9761c541 - IED server: cancel outstanding control tasks when client closes connection (to prevent blocking the connection for waiting time activated controls) 6 years ago
Michael Zillgith ebc71d9731 - IEC 61850 common: moved some internal code to better seperate
client/server side code
6 years ago
Michael Zillgith 994484d1a6 - MMS server: added semaphore for open connections map to prevent problem in multi-threaded mode 7 years ago
Michael Zillgith b35a566145 - IEC 61850 server: fixed problem in report module 7 years ago
Michael Zillgith 732ad79070 - fixed problem with read access to GCB (see github #130) 7 years ago
Michael Zillgith d9cb36817a - IEC 61850 server: fixed problem with wrong purge buffer invocation when using dynamic data set in buffered report control block 7 years ago
Michael Zillgith 1d61afaa8b - C library: removed C++ style line comments 7 years ago
Michael Zillgith 2585aab516 - cleanup examples makefiles
- fixed bug in MMS mapping read handler
7 years ago
Michael Zillgith 713ca54cd0 - IEC 61850 server: optimized dynamic memory management in control handling; memory will be initialized at server start 7 years ago
Michael Zillgith 58b4d6c107 -IEC 61850 server: added ReadAccessHandler to control read access 7 years ago
Michael Zillgith 71493036dc - IEC 61850 server/MMS server: make dynamic data set service configurable at runtime with IedServerConfig object (new functions IedServerConfig_enableLogService and IedServerConfig_isLogServiceEnabled) 7 years ago
Michael Zillgith af35ee17fa - removed unused code 7 years ago
Michael Zillgith b5cb80868c - IED SERVER: fixed bug when calling write access handler (when access policy DENY) 7 years ago
Michael Zillgith eacdfa953d - IED SERVER: fixed bug when calling write access handler (wrong pointer for ClientConnection object) 7 years ago
Michael Zillgith cc24c86484 - Fixed to compile with C++ 7 years ago
Michael Zillgith 7cb5ff670a - IEC 61850 server: added support to configure report buffer at runtime
- IEC 61850 server: new IedServerConfig type and new IedServer constructor
7 years ago
Michael Zillgith 9a8415b3e6 - IEC 61850 server: prevent sending reports when data model is locked (updated) 7 years ago
Michael Zillgith 605913b0c1 - fixed some configuration issues 7 years ago
Michael Zillgith a451731454 - IEC 61850 server: removed unnecessary dynamic string allocation 7 years ago
Michael Zillgith 64b589ac31 - IEC 61850 server: added support for OptFlds and TrgOps basic data types (required for service tracking) 8 years ago
Michael Zillgith c0a91a2a80 - fixed debug output 8 years ago
Michael Zillgith 924b4ef5c1 - IEC 61850/MMS server: removed deprecated AttributeChangedHandler 8 years ago