aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport/src/implementation
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2020-09-18 17:39:03 +0200
committerMauro Sardara <msardara@cisco.com>2020-09-18 17:41:14 +0200
commit20a773677230374ffa2d5d140f7d46032fb7bc9d (patch)
tree972ba743c7b1cfbbabd38024215af670d4dc2e3c /libtransport/src/implementation
parent22738e6177e9e1348e5a9c23c5a71e1d1ef7246f (diff)
Revert to [HICN-638] Check if systemd is running before enabling hicn-light service
Signed-off-by: Mauro Sardara <msardara@cisco.com> Change-Id: I1810d96e001a4e6e097e1efa331b682af750925d
Diffstat (limited to 'libtransport/src/implementation')
-rw-r--r--libtransport/src/implementation/socket_producer.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/libtransport/src/implementation/socket_producer.h b/libtransport/src/implementation/socket_producer.h
index 574723607..a6f0f969e 100644
--- a/libtransport/src/implementation/socket_producer.h
+++ b/libtransport/src/implementation/socket_producer.h
@@ -134,12 +134,16 @@ class ProducerSocket : public Socket<BasePortal>,
core::Packet::Format hf_format = core::Packet::Format::HF_UNSPEC;
core::Packet::Format hf_format_ah = core::Packet::Format::HF_UNSPEC;
- if (content_name.isIp4()) {
+ if (content_name.getType() == HNT_CONTIGUOUS_V4 ||
+ content_name.getType() == HNT_IOV_V4) {
hf_format = core::Packet::Format::HF_INET_TCP;
hf_format_ah = core::Packet::Format::HF_INET_TCP_AH;
- } else {
+ } else if (content_name.getType() == HNT_CONTIGUOUS_V6 ||
+ content_name.getType() == HNT_IOV_V6) {
hf_format = core::Packet::Format::HF_INET6_TCP;
hf_format_ah = core::Packet::Format::HF_INET6_TCP_AH;
+ } else {
+ throw errors::RuntimeException("Unknown name format.");
}
format = hf_format;