diff --git a/protocol/rlp/component.cpp b/protocol/rlp/component.cpp index 66c5c63..d48bf78 100644 --- a/protocol/rlp/component.cpp +++ b/protocol/rlp/component.cpp @@ -23,6 +23,7 @@ */ #include "component.h" +#include "sdt/sdt.h" #include "tcp.h" #include "udp.h" @@ -72,6 +73,19 @@ void Component::rlpSendUdp (const uint32_t vector, const PDU::Message data, const SDT::UDP::ipAddress& ip) { + switch (ip.type) { + case ACN::SDT::SDT_ADDR_IPV4: + if (!enable_IPv4) + return; + break; + case ACN::SDT::SDT_ADDR_IPV6: + if (!enable_IPv6) + return; + break; + default: + return; + } + /// Constructs an RLP PDU. auto rlp = std::make_shared(); rlp->setVector(vector); @@ -119,6 +133,19 @@ void Component::rlpSendTcp (const uint32_t vector, const PDU::Message data, const SDT::UDP::ipAddress& ip) { + switch (ip.type) { + case ACN::SDT::SDT_ADDR_IPV4: + if (!enable_IPv4) + return; + break; + case ACN::SDT::SDT_ADDR_IPV6: + if (!enable_IPv6) + return; + break; + default: + return; + } + /// Constructs an RLP PDU. auto rlp = std::make_shared(); rlp->setVector(vector);