Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e0ba33c authored by Chalard Jean's avatar Chalard Jean Committed by Automerger Merge Worker
Browse files

Merge "net: fix NPE when reading IP configurations" am: eed1a20c am: eec8e24e

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1879657

Change-Id: If604b21af23273fd6804bbe5381b7fca6f349b5d
parents 2a239d2a eec8e24e
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -322,8 +322,11 @@ public class IpConfigStore {
                                    gateway = InetAddresses.parseNumericAddress(in.readUTF());
                                }
                                // If the destination is a default IPv4 route, use the gateway
                                // address unless already set.
                                if (dest.getAddress() instanceof Inet4Address
                                // address unless already set. If there is no destination, assume
                                // it is default route and use the gateway address in all cases.
                                if (dest == null) {
                                    gatewayAddress = gateway;
                                } else if (dest.getAddress() instanceof Inet4Address
                                        && dest.getPrefixLength() == 0 && gatewayAddress == null) {
                                    gatewayAddress = gateway;
                                } else {