Uploaded image for project: 'EtherNet/IP Core V3'
  1. EtherNet/IP Core V3
  2. PSEIP-79

Restrict user Set Access to certain attributes

    Details

    • Type: Change
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: V3.6.0.0
    • Component/s: Core
    • Labels:
      None
    • Account:
      SPC EthernetIp Core (SPCETHERNET)

      Description

      Currently, we allow the host application to set a lot of attributes which in fact are completely controlled internally by the stack, e.g. the MAC address attribute of the EtherNetLink object whcih can be set via dedicated Hilscher services. A set into the attribute directory by the user has no effect, the attribute value is only set internally by the stack/object.


      Please check the list of attributes and remove application set access for all attributes which are completely controlled internally by the stack.

      This may need adaption of the host example code and test framework code

      The following changes to attribute access rights were made for this ticket:

           case EIP_DLR_ATTR_1_NETWORK_TOPOLOGY:
      -        ptDlrRsc->atInstanceAttrDir[0][uCnt].usFlags = (CIP_FLG_SET_ACCESS_USER | CIP_FLG_GET_ACCESS_BUS);
      +        ptDlrRsc->atInstanceAttrDir[0][uCnt].usFlags = (CIP_FLG_SET_ACCESS_ADMIN | CIP_FLG_GET_ACCESS_BUS);
               
             case EIP_DLR_ATTR_2_NETWORK_STATUS:
      -        ptDlrRsc->atInstanceAttrDir[0][uCnt].usFlags = (CIP_FLG_SET_ACCESS_USER | CIP_FLG_GET_ACCESS_BUS);
      +        ptDlrRsc->atInstanceAttrDir[0][uCnt].usFlags = (CIP_FLG_SET_ACCESS_ADMIN | CIP_FLG_GET_ACCESS_BUS);
      
             case EIP_DLR_ATTR_10_ACTIVE_SUPERVISOR_ADDRESS:
      -        ptDlrRsc->atInstanceAttrDir[0][uCnt].usFlags = (CIP_FLG_SET_ACCESS_USER | CIP_FLG_GET_ACCESS_BUS);
      +        ptDlrRsc->atInstanceAttrDir[0][uCnt].usFlags = (CIP_FLG_SET_ACCESS_ADMIN | CIP_FLG_GET_ACCESS_BUS);
      
             case EIP_DLR_ATTR_12_CAPABILITY_FLAGS:
      -        ptDlrRsc->atInstanceAttrDir[0][uCnt].usFlags = (CIP_FLG_SET_ACCESS_USER | CIP_FLG_GET_ACCESS_BUS);
      +        ptDlrRsc->atInstanceAttrDir[0][uCnt].usFlags = (CIP_FLG_SET_ACCESS_ADMIN | CIP_FLG_GET_ACCESS_BUS);
      
               case EIP_EN_ATTR_3_PHYSICAL_ADDRESS:
      -          ptAttr->usFlags  = (CIP_FLG_SET_ACCESS_USER | CIP_FLG_GET_ACCESS_BUS );
      +          ptAttr->usFlags  = (CIP_FLG_SET_ACCESS_ADMIN | CIP_FLG_GET_ACCESS_BUS );
      
               case EIP_EN_ATTR_4_INTERFACE_COUNTERS:
      -          ptAttr->usFlags  = (CIP_FLG_SET_ACCESS_USER | CIP_FLG_GET_ACCESS_BUS );
      +          ptAttr->usFlags  = (CIP_FLG_SET_ACCESS_NONE | CIP_FLG_GET_ACCESS_BUS );
                 
               case EIP_EN_ATTR_5_MEDIA_COUNTERS:
      -          ptAttr->usFlags  = (CIP_FLG_SET_ACCESS_USER | CIP_FLG_GET_ACCESS_BUS );
      +          ptAttr->usFlags  = (CIP_FLG_SET_ACCESS_NONE | CIP_FLG_GET_ACCESS_BUS );
               
               case EIP_EN_ATTR_8_INTERFACE_STATE:
      -          ptAttr->usFlags  = (CIP_FLG_SET_ACCESS_USER | CIP_FLG_GET_ACCESS_BUS );
      +          ptAttr->usFlags  = (CIP_FLG_SET_ACCESS_NONE | CIP_FLG_GET_ACCESS_BUS );
               
             case CIP_ID_ATTR_5_STATUS:
      -        ptAttr->usFlags = (CIP_FLG_SET_ACCESS_USER | CIP_FLG_GET_ACCESS_BUS);
      +        ptAttr->usFlags = (CIP_FLG_SET_ACCESS_ADMIN | CIP_FLG_GET_ACCESS_BUS);
               
             case CIP_ID_ATTR_9_CFG_CONSIST_VALUE:
      -        ptAttr->usFlags = (CIP_FLG_SET_ACCESS_USER | CIP_FLG_GET_ACCESS_BUS);
      +        ptAttr->usFlags = (CIP_FLG_SET_ACCESS_ADMIN | CIP_FLG_GET_ACCESS_BUS);
      
             case CIP_ID_ATTR_10_HEARTBEAT_INTERVAL:
      -        ptAttr->usFlags = (CIP_FLG_SET_ACCESS_USER | CIP_FLG_GET_ACCESS_BUS | CIP_FLG_TREAT_DISABLE);
      +        ptAttr->usFlags = (CIP_FLG_SET_ACCESS_ADMIN | CIP_FLG_GET_ACCESS_BUS | CIP_FLG_TREAT_DISABLE);
               
             case EIP_TCP_ATTR_1_STATUS:
      -        ptAttr->usFlags = (CIP_FLG_SET_ACCESS_USER | CIP_FLG_GET_ACCESS_BUS );
      +        ptAttr->usFlags = (CIP_FLG_SET_ACCESS_NONE | CIP_FLG_GET_ACCESS_BUS );
              

        Attachments

          Issue Links

            Expenses

              Activity

                Status Description

                  People

                  • Reporter:
                    MBommert Marc Bommert
                  • Votes:
                    0 Vote for this issue
                    Watchers:
                    0 Start watching this issue

                    Dates

                    • Created:
                      Updated:
                      Resolved: