am 32d106e1: Filter out addresses that are 0.

* commit '32d106e154d0388ac13774fad3c58ff60ba9ae8f':
  Filter out addresses that are 0.
diff --git a/telephony/java/com/android/internal/telephony/DataCallState.java b/telephony/java/com/android/internal/telephony/DataCallState.java
index a69ce8b..6d8956f 100644
--- a/telephony/java/com/android/internal/telephony/DataCallState.java
+++ b/telephony/java/com/android/internal/telephony/DataCallState.java
@@ -142,13 +142,15 @@
                         } catch (IllegalArgumentException e) {
                             throw new UnknownHostException("Non-numeric ip addr=" + addr);
                         }
-                        if (addrPrefixLen == 0) {
-                            // Assume point to point
-                            addrPrefixLen = (ia instanceof Inet4Address) ? 32 : 128;
+                        if (! ia.isAnyLocalAddress()) {
+                            if (addrPrefixLen == 0) {
+                                // Assume point to point
+                                addrPrefixLen = (ia instanceof Inet4Address) ? 32 : 128;
+                            }
+                            if (DBG) Log.d(LOG_TAG, "addr/pl=" + addr + "/" + addrPrefixLen);
+                            la = new LinkAddress(ia, addrPrefixLen);
+                            linkProperties.addLinkAddress(la);
                         }
-                        if (DBG) Log.d(LOG_TAG, "addr/pl=" + addr + "/" + addrPrefixLen);
-                        la = new LinkAddress(ia, addrPrefixLen);
-                        linkProperties.addLinkAddress(la);
                     }
                 } else {
                     throw new UnknownHostException("no address for ifname=" + ifname);
@@ -163,21 +165,24 @@
                         } catch (IllegalArgumentException e) {
                             throw new UnknownHostException("Non-numeric dns addr=" + addr);
                         }
-                        linkProperties.addDns(ia);
+                        if (! ia.isAnyLocalAddress()) {
+                            linkProperties.addDns(ia);
+                        }
                     }
                 } else if (okToUseSystemPropertyDns){
                     String dnsServers[] = new String[2];
                     dnsServers[0] = SystemProperties.get(propertyPrefix + "dns1");
                     dnsServers[1] = SystemProperties.get(propertyPrefix + "dns2");
                     for (String dnsAddr : dnsServers) {
-                            InetAddress ia;
-                            try {
-                                ia = NetworkUtils.numericToInetAddress(dnsAddr);
-                            } catch (IllegalArgumentException e) {
-                                throw new UnknownHostException("Non-numeric dns addr="
-                                            + dnsAddr);
-                            }
+                        InetAddress ia;
+                        try {
+                            ia = NetworkUtils.numericToInetAddress(dnsAddr);
+                        } catch (IllegalArgumentException e) {
+                            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,7 +204,9 @@
                     } catch (IllegalArgumentException e) {
                         throw new UnknownHostException("Non-numeric gateway addr=" + addr);
                     }
-                    linkProperties.addRoute(new RouteInfo(ia));
+                    if (! ia.isAnyLocalAddress()) {
+                        linkProperties.addRoute(new RouteInfo(ia));
+                    }
                 }
 
                 result = SetupResult.SUCCESS;