Changeset 190:1bc21e47691a in finroc_plugins_tcp


Ignore:
Timestamp:
13.09.2020 08:18:12 (3 months ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
17.03
Phase:
public
Message:

Adds TCP plugin option to restrict structure access to finstruct connections only

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • internal/tConnection.cpp

    r189 r190  
    221221        std::string restrict_access_prefix = connection->peer.par_restrict_structure_access_to_listen_address_prefix.Get(); 
    222222        bool access_denied = false; 
    223         if (restrict_access_prefix.length() && message.Get<3>() != tStructureExchange::SHARED_PORTS) 
     223        if (restrict_access_prefix.length() && (message.Get<3>() == tStructureExchange::FINSTRUCT || (message.Get<3>() == tStructureExchange::COMPLETE_STRUCTURE && (!connection->peer.par_restrict_structure_access_to_finstruct_only.Get())))) 
    224224        { 
    225225          std::stringstream stream; 
  • tTCPPlugin.cpp

    r189 r190  
    103103  par_server_listen_address(this, "Server Listen Address", "0.0.0.0"), // = "0.0.0.0"; 
    104104  par_restrict_structure_access_to_listen_address_prefix(this, "Restrict Structure Access To Listen Address Prefix", ""), 
     105  par_restrict_structure_access_to_finstruct_only(this, "Restrict Structure Access To Finstruct Only", ""), 
    105106  par_peer_type(this, "Peer Type", tPeerType::FULL), 
    106107  par_debug_tcp(this, "Debug TCP", true), 
  • tTCPPlugin.h

    r189 r190  
    105105  tStaticParameter<std::string> par_restrict_structure_access_to_listen_address_prefix; 
    106106 
     107  /*! If set, restrictions from above parameter apply to finstruct conncections only */ 
     108  tStaticParameter<bool> par_restrict_structure_access_to_finstruct_only; 
     109 
    107110  /* Type of peer to be created */ 
    108111  tStaticParameter<tPeerType> par_peer_type; 
Note: See TracChangeset for help on using the changeset viewer.