Skip to content

Commit

Permalink
Reject interfaces that have no addresses
Browse files Browse the repository at this point in the history
Cherry-pick of 0ccc673 from release-1.15 branch.
  • Loading branch information
kwvanderlinde committed Sep 18, 2024
1 parent eb6de1a commit baa89cd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/net/rptools/maptool/util/UPnPUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ public static boolean findIGDs() {
NetworkInterface ni = e.nextElement();
try {
var addresses = Collections.list(ni.getInetAddresses());
if (ni.isLoopback()) {
if (addresses.isEmpty()) {
log.info("UPnP: Rejecting interface '{}' as it has no addresses", ni.getDisplayName());
} else if (ni.isLoopback()) {
log.info(
"UPnP: Rejecting interface '{}' [{}] as it is a loopback",
ni.getDisplayName(),
Expand Down

0 comments on commit baa89cd

Please sign in to comment.