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

Commit e08f300c authored by Chalard Jean's avatar Chalard Jean Committed by android-build-merger
Browse files

Merge "Add PCSCF to LinkProperties." am: 5713e957

am: 341bfc88

Change-Id: I43c874186d0890a5b7bdf439318bdcaf22213447
parents 6595f49e 341bfc88
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -1184,6 +1184,26 @@ public class DataConnection extends StateMachine {
                    throw new UnknownHostException("Empty dns response and no system default dns");
                }

                // set pcscf
                if (response.getPcscfs().size() > 0) {
                    for (String pcscf : response.getPcscfs()) {
                        if (pcscf == null) continue;
                        pcscf = pcscf.trim();
                        if (pcscf.isEmpty()) continue;
                        InetAddress ia;
                        try {
                            ia = NetworkUtils.numericToInetAddress(pcscf);
                        } catch (IllegalArgumentException e) {
                            throw new UnknownHostException("Non-numeric pcscf addr=" + pcscf);
                        }
                        if (!ia.isAnyLocalAddress()) {
                            linkProperties.addPcscfServer(ia);
                        } else {
                            log("bad address in PCSCF");
                        }
                    }
                }

                for (InetAddress gateway : response.getGateways()) {
                    // Allow 0.0.0.0 or :: as a gateway;
                    // this indicates a point-to-point interface.