* @param $decodedData Decoded raw package data array
* @return void
* @todo Add some validation of recipient field, e.g. ip:port is found
+ * @todo The if() does only check for TCP, not UDP, e.g. try to get a $handlerInstance here
*/
public function discoverDecodedRecipients (array $decodedData) {
// First clear all recipients
$recipient = explode(':', $decodedData[NetworkPackage::PACKAGE_DATA_RECIPIENT]);
// Is the 'recipient' field same as this peer's IP?
- if ($recipient[0] == HubTools::determineOwnExternalIp()) {
+ if ((($recipient[0] == HubTools::determineOwnExternalIp()) && ($recipient[1] == $this->getConfigInstance()->getConfigEntry('node_tcp_listen_port'))) || ($recipient[0] == ConsoleTools::acquireSelfIPAddress())) {
/*
- * Is same as own external IP, don't do anything here so other
+ * Is same as own external IP+TCP port or internal IP, don't do anything here so other
* classes found an empty recipient list for internal (own) handling
* of the original content.
*/
// Debug output (may flood)
- /* NOISY-DEBUG: */ $this->debugOutput('RECIPIENT-DISCOVERY: Recipient ' . $recipient[0] . ' matches own ip (' . HubTools::determineOwnExternalIp() . ')');
+ /* NOISY-DEBUG: */ $this->debugOutput('RECIPIENT-DISCOVERY: Recipient ' . $recipient[0] . ' matches own ip (' . HubTools::determineOwnExternalIp() . ' or ' . ConsoleTools::acquireSelfIPAddress() . ')');
} else {
// Debug output (may flood)
- /* NOISY-DEBUG: */ $this->debugOutput('RECIPIENT-DISCOVERY: Recipient ' . $recipient[0] . ' is different than own ip (' . HubTools::determineOwnExternalIp() . '), need to forward (not yet implemented)!');
+ /* NOISY-DEBUG: */ $this->debugOutput('RECIPIENT-DISCOVERY: Recipient ' . $recipient[0] . ' is different than own external ip (' . HubTools::determineOwnExternalIp() . ') nor internal ip (' . ConsoleTools::acquireSelfIPAddress() . '), need to forward (not yet implemented)!');
// This package is to be delivered to someone else, so add it
$this->getListInstance()->addEntry('ip_port', $decodedData[NetworkPackage::PACKAGE_DATA_RECIPIENT]);
./application/hub/main/database/wrapper/states/class_PeerStateLookupDatabaseWrapper.php:177: * @todo Unfinished area
./application/hub/main/database/wrapper/states/class_PeerStateLookupDatabaseWrapper.php:219: * @todo Unfinished area
./application/hub/main/discovery/package/class_PackageRecipientDiscovery.php:100: * @todo Add some validation of recipient field, e.g. ip:port is found
+./application/hub/main/discovery/package/class_PackageRecipientDiscovery.php:101: * @todo The if() does only check for TCP, not UDP, e.g. try to get a $handlerInstance here
./application/hub/main/factories/socket/class_SocketFactory.php:10: * @todo Find an interface for hub helper
./application/hub/main/filter/bootstrap/chat/class_ChatBootstrapGenericActivationFilter.php:54: * @todo Maybe we want to do somthing more here?
./application/hub/main/filter/bootstrap/cruncher/class_CruncherBootstrapBufferQueueInitializerFilter.php:54: * @todo 0% done