face: allow setting default UDP face MTU in config
refs #5138
Change-Id: Ibb3767b27aec2b046d1f41292f3d61001866f8c0
diff --git a/tests/daemon/face/udp-channel-fixture.hpp b/tests/daemon/face/udp-channel-fixture.hpp
index 93c5a86..6f57b90 100644
--- a/tests/daemon/face/udp-channel-fixture.hpp
+++ b/tests/daemon/face/udp-channel-fixture.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2020, Regents of the University of California,
+ * Copyright (c) 2014-2021, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -39,12 +39,12 @@
{
protected:
shared_ptr<UdpChannel>
- makeChannel(const boost::asio::ip::address& addr, uint16_t port = 0) final
+ makeChannel(const boost::asio::ip::address& addr, uint16_t port = 0, optional<size_t> mtu = nullopt) final
{
if (port == 0)
port = getNextPort();
- return std::make_shared<UdpChannel>(udp::Endpoint(addr, port), 2_s, false);
+ return std::make_shared<UdpChannel>(udp::Endpoint(addr, port), 2_s, false, mtu.value_or(ndn::MAX_NDN_PACKET_SIZE));
}
void