summaryrefslogtreecommitdiff
path: root/framework-t/src/android/net/IpSecAlgorithm.java
diff options
context:
space:
mode:
authorgary-wzl77 <gary.wang@canonical.com>2021-10-13 20:53:00 +0800
committergary-wzl77 <gary.wang@canonical.com>2021-11-25 22:05:31 +0800
commit4d7813dacc7b68c77361426a74a11c015fdb10bc (patch)
tree98e0e788c19867bf17b90b59fcac0ef98a42d749 /framework-t/src/android/net/IpSecAlgorithm.java
parent16d3da63f7a424d6a4c7bc392cd5412383f510b2 (diff)
net: fix NPE when reading IP configurations
When the default gateway is not used in IP configurations, for example the gateway info in ip configurations was fed with custom gateway address ``` out.writeUTF(GATEWAY_KEY); out.writeInt(0); // Default route. out.writeInt(1); // Have a gateway. out.writeUTF(staticIpConfiguration.getGateway().getHostAddress()); ``` A NPE occurred. When there is no destination, assume it is default route and use the gateway address in all cases. Test: manual Change-Id: I5904efad5d277de6724f81d99e62c21ff8347caa Signed-off-by: gary-wzl77 <gary.wang@canonical.com>
Diffstat (limited to 'framework-t/src/android/net/IpSecAlgorithm.java')
0 files changed, 0 insertions, 0 deletions