Skip to content

Commit

Permalink
Reject interfaces that have no addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
kwvanderlinde committed Sep 12, 2024
1 parent 4a3d5ad commit 0ccc673
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 0ccc673

Please sign in to comment.