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

Commit 22d93a0d authored by Robert Greenwalt's avatar Robert Greenwalt
Browse files

resolved conflicts for merge of 41394a36 to honeycomb-plus-aosp

Change-Id: If4dc99c558dc45c9a7ff8d3ea5be69578b4ee793
parents bce8effe 41394a36
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -113,8 +113,8 @@ static void dumpstate() {
    dump_file("NETWORK ROUTES", "/proc/net/route");
    dump_file("NETWORK ROUTES IPV6", "/proc/net/ipv6_route");
    dump_file("ARP CACHE", "/proc/net/arp");
    run_command("IPTABLES", 10, "su", "root", "iptables", "-L", NULL);
    run_command("IPTABLE NAT", 10, "su", "root", "iptables", "-t", "nat", "-L", NULL);
    run_command("IPTABLES", 10, "su", "root", "iptables", "-L", "-n", NULL);
    run_command("IPTABLE NAT", 10, "su", "root", "iptables", "-t", "nat", "-L", "-n", NULL);

    run_command("WIFI NETWORKS", 20,
            "su", "root", "wpa_cli", "list_networks", NULL);
+2 −2
Original line number Diff line number Diff line
@@ -252,12 +252,12 @@ interface INetworkManagementService
    void setDnsServersForInterface(String iface, in String[] servers);

    /**
     * Flush the DNS cache associated with the default interface
     * Flush the DNS cache associated with the default interface.
     */
    void flushDefaultDnsCache();

    /**
     * Flush the DNS cache associated with the specified interface
     * Flush the DNS cache associated with the specified interface.
     */
    void flushInterfaceDnsCache(String iface);
}
+6 −0
Original line number Diff line number Diff line
@@ -1985,6 +1985,12 @@ public class ConnectivityService extends IConnectivityManager.Stub {
            LinkProperties p = nt.getLinkProperties();
            if (p == null) return;
            Collection<InetAddress> dnses = p.getDnses();
            try {
                mNetd.setDnsServersForInterface(p.getInterfaceName(),
                        NetworkUtils.makeStrings(dnses));
            } catch (Exception e) {
                Slog.e(TAG, "exception setting dns servers: " + e);
            }
            boolean changed = false;
            if (mNetConfigs[netType].isDefault()) {
                String network = nt.getNetworkInfo().getTypeName();
+7 −8
Original line number Diff line number Diff line
@@ -1375,18 +1375,17 @@ class NetworkManagementService extends INetworkManagementService.Stub {
        try {
            String cmd = "resolver setifdns " + iface;
            for (String s : servers) {
                if (s != null && !"0.0.0.0".equals(s) &&
                        !"::".equals(s) && !"0:0:0:0:0:0:0:0".equals(s)) {
                    cmd += " " + InetAddress.getByName(s).getHostAddress();
                InetAddress a = NetworkUtils.numericToInetAddress(s);
                if (a.isAnyLocalAddress() == false) {
                    cmd += " " + a.getHostAddress();
                }
            }

            mConnector.doCommand(cmd);
        } catch (UnknownHostException e) {
            throw new IllegalStateException("failed to resolve dns address.", e);
        } catch (IllegalArgumentException e) {
            throw new IllegalStateException("Error setting dnsn for interface", e);
        } catch (NativeDaemonConnectorException e) {
            throw new IllegalStateException(
                    "Error communicating with native deamon to set dns for interface", e);
                    "Error communicating with native daemon to set dns for interface", e);
        }
    }

@@ -1412,7 +1411,7 @@ class NetworkManagementService extends INetworkManagementService.Stub {
            mConnector.doCommand(cmd);
        } catch (NativeDaemonConnectorException e) {
            throw new IllegalStateException(
                    "Error communicating with native deamon to flush interface " + iface, e);
                    "Error communicating with native daemon to flush interface " + iface, e);
        }
    }
}
+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) {