Module: sems Branch: master Commit: 0ebee91f4fb2ee0e2251fc091a8a36a3777c9715 URL: https://github.com/sems-server/sems/commit/0ebee91f4fb2ee0e2251fc091a8a36a3777c9715
Author: Stefan Sayer <[email protected]> Committer: Stefan Sayer <[email protected]> Date: 2015-06-15T15:36:50+02:00 b/f: fix of 3a840c4 b/f:core:config: use IPs of IFs configured with names when autodetecting outgoing interfaces fillSysIntfList would map missing system IP addresses to configured interfaces too early, so it wouldn't be possible to insert some interfaces from the configuration --- Modified: core/AmConfig.cpp --- Diff: https://github.com/sems-server/sems/commit/0ebee91f4fb2ee0e2251fc091a8a36a3777c9715.diff Patch: https://github.com/sems-server/sems/commit/0ebee91f4fb2ee0e2251fc091a8a36a3777c9715.patch --- diff --git a/core/AmConfig.cpp b/core/AmConfig.cpp index bb780b9..a1350f9 100644 --- a/core/AmConfig.cpp +++ b/core/AmConfig.cpp @@ -1023,6 +1023,10 @@ static bool fillSysIntfList() freeifaddrs(ifap); close(fd); + return true; +} + +static void fillMissingLocalSIPIPfromSysIntfs() { // add addresses from SysIntfList, if not present for(unsigned int idx = 0; idx < AmConfig::SIP_Ifs.size(); idx++) { @@ -1045,15 +1049,15 @@ static bool fillSysIntfList() if(AmConfig::LocalSIPIP2If.find(intf_it->addrs.front().addr) == AmConfig::LocalSIPIP2If.end()) { - + DBG("mapping unmapped IP address '%s' to interface #%u \n", + intf_it->addrs.front().addr.c_str(), idx); AmConfig::LocalSIPIP2If[intf_it->addrs.front().addr] = idx; } } } - - return true; } + /** Get the AF_INET[6] address associated with the network interface */ string fixIface2IP(const string& dev_name, bool v6_for_sip) { @@ -1195,6 +1199,8 @@ int AmConfig::finalizeIPConfig() RTP_If_names["default"] = 0; } + fillMissingLocalSIPIPfromSysIntfs(); + return 0; } _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
