mgmt+face: allow MTU of datagram faces to be overridden

refs #4005

Change-Id: I01d98b88cdee41b633f6fb9a5600088efe8de749
diff --git a/daemon/face/ethernet-factory.cpp b/daemon/face/ethernet-factory.cpp
index f9767df..aab8aa4 100644
--- a/daemon/face/ethernet-factory.cpp
+++ b/daemon/face/ethernet-factory.cpp
@@ -200,6 +200,13 @@
     return;
   }
 
+  if (req.params.mtu && *req.params.mtu < Transport::MIN_MTU) {
+    // The specified MTU must be greater than the minimum possible
+    NFD_LOG_TRACE("createFace cannot create a face with an MTU less than " << Transport::MIN_MTU);
+    onFailure(406, "MTU cannot be less than " + to_string(Transport::MIN_MTU));
+    return;
+  }
+
   for (const auto& i : m_channels) {
     if (i.first == localEndpoint) {
       i.second->connect(remoteEndpoint, req.params, onCreated, onFailure);