Transport: Fix UPnP IPv6 NPE

ref: http://zzz.i2p/topics/3153
This commit is contained in:
zzz
2021-07-23 11:07:59 -04:00
parent 24ef2b5189
commit 6eb1510324
4 changed files with 12 additions and 3 deletions

View File

@@ -1,3 +1,9 @@
2021-07-23 zzz
* Transport: Fix UPnP IPv6 NPE
2021-07-22 zzz
* Tunnels: Fixes for proposal 157
2021-07-20 zzz
* NetDB: Increase min ff version to 0.9.38

View File

@@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */
public final static String ID = "Git";
public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 5;
public final static long BUILD = 6;
/** for example "-test" */
public final static String EXTRA = "";

View File

@@ -818,7 +818,8 @@ public class TransportManager implements TransportEventListener {
}
if (ra != null) {
String host = ra.getHost();
rv.add(new Port(t.getStyle(), host, port));
if (host != null)
rv.add(new Port(t.getStyle(), host, port));
}
}
}

View File

@@ -1902,10 +1902,12 @@ public class UPnP extends ControlPoint implements DeviceChangeListener, EventLis
private long _expires;
/**
* @param ip the IPv6 address being forwarded
* @param ip the IPv6 address being forwarded, non-null
*/
public IPv6ForwardPort(String name, int protocol, int port, String ip) {
super(name, true, protocol, port);
if (ip == null)
throw new IllegalArgumentException();
_ip = ip;
}