Log the internal port for the UPnP mappings

This commit is contained in:
Cameron Gutman 2020-08-14 17:51:06 -07:00
parent 41ef072c9b
commit 21d8c71a2c
2 changed files with 3 additions and 3 deletions

View File

@ -116,7 +116,7 @@ bool UPnPMapPort(struct UPNPUrls* urls, struct IGDdatas* data, int proto, const
// Some routers change the description, so we can't check that here
if (!strcmp(intClient, myAddr)) {
if (atoi(leaseDuration) == 0) {
printf("OK (Static)" NL);
printf("OK (Static, Internal port: %s)" NL, intPort);
// If we have an existing permanent mapping, we can just leave it alone.
if (enable) {
@ -124,7 +124,7 @@ bool UPnPMapPort(struct UPNPUrls* urls, struct IGDdatas* data, int proto, const
}
}
else {
printf("OK (%s seconds remaining)" NL, leaseDuration);
printf("OK (%s seconds remaining, Internal port: %s)" NL, leaseDuration, intPort);
}
// If we're just validating, we found an entry, so we're done.

View File

@ -1002,7 +1002,7 @@ UPnPPortStatus UPnPCheckPort(struct UPNPUrls* urls, struct IGDdatas* data, int p
}
else if (err == UPNPCOMMAND_SUCCESS) {
if (!strcmp(myAddr, intClient)) {
fprintf(LOG_OUT, "OK\n");
fprintf(LOG_OUT, "OK (Internal port: %s)\n", intPort);
return OK;
}
else {