diff --git a/src/core/model/type-id.cc b/src/core/model/type-id.cc --- a/src/core/model/type-id.cc +++ b/src/core/model/type-id.cc @@ -610,6 +610,12 @@ { NS_LOG_FUNCTION (this << uid << name << help << flags << initialValue << accessor << checker); struct IidInformation *information = LookupInformation (uid); + if (name.find (' ') != std::string::npos) + { + NS_FATAL_ERROR ("Attribute name \"" << name << "\" may not contain spaces ' ', " + << "encountered when registering TypeId \"" + << information->name << "\""); + } if (HasAttribute (uid, name)) { NS_FATAL_ERROR ("Attribute \"" << name << "\" already registered on tid=\"" <<