face: allow GenericLinkService to override MTU
refs #5056
Change-Id: I8eb2dd732b1431e0e809deb53792a14be1698ff1
diff --git a/daemon/face/udp-channel.cpp b/daemon/face/udp-channel.cpp
index 5a23758..4776661 100644
--- a/daemon/face/udp-channel.cpp
+++ b/daemon/face/udp-channel.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2019, Regents of the University of California,
+ * Copyright (c) 2014-2020, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -180,9 +180,13 @@
options.defaultCongestionThreshold = *params.defaultCongestionThreshold;
}
+ if (params.mtu) {
+ options.overrideMtu = *params.mtu;
+ }
+
auto linkService = make_unique<GenericLinkService>(options);
auto transport = make_unique<UnicastUdpTransport>(std::move(socket), params.persistency,
- m_idleFaceTimeout, params.mtu);
+ m_idleFaceTimeout);
auto face = make_shared<Face>(std::move(linkService), std::move(transport));
m_channelFaces[remoteEndpoint] = face;