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

Commit bfce7034 authored by Wink Saville's avatar Wink Saville Committed by Android Git Automerger
Browse files

am 32d106e1: Filter out addresses that are 0.

* commit '32d106e1':
  Filter out addresses that are 0.
parents 8ba16551 32d106e1
Loading
Loading
Loading
Loading
+22 −15
Original line number Diff line number Diff line
@@ -142,6 +142,7 @@ public class DataCallState {
                        } catch (IllegalArgumentException e) {
                            throw new UnknownHostException("Non-numeric ip addr=" + addr);
                        }
                        if (! ia.isAnyLocalAddress()) {
                            if (addrPrefixLen == 0) {
                                // Assume point to point
                                addrPrefixLen = (ia instanceof Inet4Address) ? 32 : 128;
@@ -150,6 +151,7 @@ public class DataCallState {
                            la = new LinkAddress(ia, addrPrefixLen);
                            linkProperties.addLinkAddress(la);
                        }
                    }
                } else {
                    throw new UnknownHostException("no address for ifname=" + ifname);
                }
@@ -163,8 +165,10 @@ public class DataCallState {
                        } catch (IllegalArgumentException e) {
                            throw new UnknownHostException("Non-numeric dns addr=" + addr);
                        }
                        if (! ia.isAnyLocalAddress()) {
                            linkProperties.addDns(ia);
                        }
                    }
                } else if (okToUseSystemPropertyDns){
                    String dnsServers[] = new String[2];
                    dnsServers[0] = SystemProperties.get(propertyPrefix + "dns1");
@@ -174,11 +178,12 @@ public class DataCallState {
                        try {
                            ia = NetworkUtils.numericToInetAddress(dnsAddr);
                        } catch (IllegalArgumentException e) {
                                throw new UnknownHostException("Non-numeric dns addr="
                                            + dnsAddr);
                            throw new UnknownHostException("Non-numeric dns addr=" + dnsAddr);
                        }
                        if (! ia.isAnyLocalAddress()) {
                            linkProperties.addDns(ia);
                        }
                    }
                } else {
                    throw new UnknownHostException("Empty dns response and no system default dns");
                }
@@ -199,8 +204,10 @@ public class DataCallState {
                    } catch (IllegalArgumentException e) {
                        throw new UnknownHostException("Non-numeric gateway addr=" + addr);
                    }
                    if (! ia.isAnyLocalAddress()) {
                        linkProperties.addRoute(new RouteInfo(ia));
                    }
                }

                result = SetupResult.SUCCESS;
            } catch (UnknownHostException e) {