face: allow enabling/disabling congestion marking through config file
refs #4465
Change-Id: I888b83b1fdbe8e3fc36a902bf7af52147807d829
diff --git a/daemon/face/tcp-factory.cpp b/daemon/face/tcp-factory.cpp
index 66335c5..fae3c54 100644
--- a/daemon/face/tcp-factory.cpp
+++ b/daemon/face/tcp-factory.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2017, Regents of the University of California,
+ * Copyright (c) 2014-2018, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -59,6 +59,8 @@
// enable_v6 yes
// }
+ m_wantCongestionMarking = context.generalConfig.wantCongestionMarking;
+
if (!configSection) {
if (!context.isDryRun && !m_channels.empty()) {
NFD_LOG_WARN("Cannot disable tcp4 and tcp6 channels after initialization");
@@ -178,7 +180,7 @@
if (it != m_channels.end())
return it->second;
- auto channel = make_shared<TcpChannel>(endpoint);
+ auto channel = make_shared<TcpChannel>(endpoint, m_wantCongestionMarking);
m_channels[endpoint] = channel;
return channel;
}