blob: 444b5aa7100a650f9179c8041be1e3b202f5ffd4 [file] [log] [blame]
Luca Prete9c2ee072016-02-16 11:00:44 -08001/*
Luca Prete99f6f282016-12-05 15:33:36 -08002 * Copyright 2015-present Open Networking Laboratory
Luca Prete9c2ee072016-02-16 11:00:44 -08003 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
Luca Prete99f6f282016-12-05 15:33:36 -080014 * limitations under the License.
Luca Prete9c2ee072016-02-16 11:00:44 -080015 */
16package org.onosproject.vpls;
17
nosignal5fd282e2016-09-16 16:11:40 -070018import com.google.common.collect.ImmutableSet;
19import com.google.common.collect.Lists;
Luca Prete9c2ee072016-02-16 11:00:44 -080020import com.google.common.collect.SetMultimap;
nosignal5fd282e2016-09-16 16:11:40 -070021import com.google.common.collect.Sets;
Luca Prete9c2ee072016-02-16 11:00:44 -080022import org.apache.felix.scr.annotations.Activate;
23import org.apache.felix.scr.annotations.Component;
24import org.apache.felix.scr.annotations.Deactivate;
25import org.apache.felix.scr.annotations.Reference;
26import org.apache.felix.scr.annotations.ReferenceCardinality;
27import org.onlab.packet.MacAddress;
28import org.onlab.packet.VlanId;
29import org.onosproject.app.ApplicationService;
30import org.onosproject.core.ApplicationId;
31import org.onosproject.core.CoreService;
nosignal5fd282e2016-09-16 16:11:40 -070032import org.onosproject.incubator.net.intf.Interface;
Luca Pretea8854822016-04-26 16:30:55 -070033import org.onosproject.incubator.net.intf.InterfaceEvent;
34import org.onosproject.incubator.net.intf.InterfaceListener;
Luca Prete9c2ee072016-02-16 11:00:44 -080035import org.onosproject.incubator.net.intf.InterfaceService;
Luca Prete092e8952016-10-26 16:25:56 +020036import org.onosproject.net.EncapsulationType;
nosignal5fd282e2016-09-16 16:11:40 -070037import org.onosproject.net.FilteredConnectPoint;
Luca Prete9c2ee072016-02-16 11:00:44 -080038import org.onosproject.net.Host;
nosignal5fd282e2016-09-16 16:11:40 -070039import org.onosproject.net.config.NetworkConfigEvent;
40import org.onosproject.net.config.NetworkConfigListener;
41import org.onosproject.net.config.NetworkConfigService;
42import org.onosproject.net.flow.DefaultTrafficSelector;
43import org.onosproject.net.flow.TrafficSelector;
44import org.onosproject.net.flow.criteria.Criterion;
45import org.onosproject.net.flow.criteria.VlanIdCriterion;
Luca Prete9c2ee072016-02-16 11:00:44 -080046import org.onosproject.net.host.HostEvent;
47import org.onosproject.net.host.HostListener;
48import org.onosproject.net.host.HostService;
nosignal5fd282e2016-09-16 16:11:40 -070049import org.onosproject.net.intent.Intent;
Luca Prete9c2ee072016-02-16 11:00:44 -080050import org.onosproject.net.intent.IntentService;
nosignal5fd282e2016-09-16 16:11:40 -070051import org.onosproject.net.intent.Key;
Luca Prete9c2ee072016-02-16 11:00:44 -080052import org.onosproject.routing.IntentSynchronizationService;
Carolina Fernandezb1cef5c2016-11-22 19:18:40 +010053import org.onosproject.vpls.config.VplsConfigService;
Luca Prete9c2ee072016-02-16 11:00:44 -080054import org.slf4j.Logger;
55
nosignal5fd282e2016-09-16 16:11:40 -070056import java.util.Collection;
57import java.util.HashSet;
58import java.util.List;
Luca Prete9c2ee072016-02-16 11:00:44 -080059import java.util.Set;
nosignal5fd282e2016-09-16 16:11:40 -070060import java.util.stream.Collectors;
Luca Prete9c2ee072016-02-16 11:00:44 -080061
nosignal5fd282e2016-09-16 16:11:40 -070062import static org.onosproject.vpls.IntentInstaller.PREFIX_BROADCAST;
63import static org.onosproject.vpls.IntentInstaller.PREFIX_UNICAST;
Carolina Fernandezb1cef5c2016-11-22 19:18:40 +010064import static org.slf4j.LoggerFactory.getLogger;
Luca Prete9c2ee072016-02-16 11:00:44 -080065
66/**
Luca Prete092e8952016-10-26 16:25:56 +020067 * Application to create L2 broadcast overlay networks using VLANs.
Luca Prete9c2ee072016-02-16 11:00:44 -080068 */
69@Component(immediate = true)
70public class Vpls {
nosignal5fd282e2016-09-16 16:11:40 -070071 static final String VPLS_APP = "org.onosproject.vpls";
72
73 private static final String HOST_FCP_NOT_FOUND =
74 "Filtered connected point for host {} not found";
75 private static final String HOST_EVENT = "Received HostEvent {}";
76 private static final String INTF_CONF_EVENT =
77 "Received InterfaceConfigEvent {}";
78 private static final String NET_CONF_EVENT =
79 "Received NetworkConfigEvent {}";
Yi Tseng28767f02016-09-13 04:27:20 -070080
Luca Prete9c2ee072016-02-16 11:00:44 -080081 private final Logger log = getLogger(getClass());
82
83 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
84 protected ApplicationService applicationService;
85
86 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
87 protected CoreService coreService;
88
89 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
90 protected HostService hostService;
91
92 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
93 protected IntentService intentService;
94
95 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
96 protected InterfaceService interfaceService;
97
98 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
99 protected IntentSynchronizationService intentSynchronizer;
100
nosignal5fd282e2016-09-16 16:11:40 -0700101 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
102 protected NetworkConfigService configService;
103
104 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
Carolina Fernandezb1cef5c2016-11-22 19:18:40 +0100105 protected VplsConfigService vplsConfigService;
nosignal5fd282e2016-09-16 16:11:40 -0700106
Luca Prete9c2ee072016-02-16 11:00:44 -0800107 private final HostListener hostListener = new InternalHostListener();
108
Luca Prete092e8952016-10-26 16:25:56 +0200109 private final InternalInterfaceListener interfaceListener =
110 new InternalInterfaceListener();
Luca Pretea8854822016-04-26 16:30:55 -0700111
nosignal5fd282e2016-09-16 16:11:40 -0700112 private final InternalNetworkConfigListener configListener =
113 new InternalNetworkConfigListener();
114
Luca Prete9c2ee072016-02-16 11:00:44 -0800115 private IntentInstaller intentInstaller;
116
117 private ApplicationId appId;
118
119 @Activate
120 public void activate() {
121 appId = coreService.registerApplication(VPLS_APP);
122
123 intentInstaller = new IntentInstaller(appId,
124 intentService,
125 intentSynchronizer);
126
Luca Prete2705d662016-04-29 15:30:23 -0700127 applicationService.registerDeactivateHook(appId, () -> {
128 intentSynchronizer.removeIntentsByAppId(appId);
129 });
Luca Prete9c2ee072016-02-16 11:00:44 -0800130
131 hostService.addListener(hostListener);
Luca Pretea8854822016-04-26 16:30:55 -0700132 interfaceService.addListener(interfaceListener);
nosignal5fd282e2016-09-16 16:11:40 -0700133 configService.addListener(configListener);
Luca Prete9c2ee072016-02-16 11:00:44 -0800134
nosignal5fd282e2016-09-16 16:11:40 -0700135 setupConnectivity(false);
Luca Prete9c2ee072016-02-16 11:00:44 -0800136
Luca Pretec21c6e62016-09-22 14:52:21 -0700137 log.info("Activated");
Luca Prete9c2ee072016-02-16 11:00:44 -0800138 }
139
140 @Deactivate
141 public void deactivate() {
Yi Tsenge53d2282017-01-11 14:40:48 -0800142 hostService.removeListener(hostListener);
143 interfaceService.removeListener(interfaceListener);
nosignal5fd282e2016-09-16 16:11:40 -0700144 configService.removeListener(configListener);
Yi Tseng28767f02016-09-13 04:27:20 -0700145 intentSynchronizer.removeIntentsByAppId(appId);
Luca Pretec21c6e62016-09-22 14:52:21 -0700146 log.info("Deactivated");
Luca Prete9c2ee072016-02-16 11:00:44 -0800147 }
148
nosignal5fd282e2016-09-16 16:11:40 -0700149 /**
150 * Sets up connectivity for all VPLSs.
151 *
152 * @param isNetworkConfigEvent true if this function is triggered
153 * by NetworkConfigEvent; false otherwise
154 */
155 private void setupConnectivity(boolean isNetworkConfigEvent) {
156 SetMultimap<String, Interface> networkInterfaces =
Luca Prete092e8952016-10-26 16:25:56 +0200157 vplsConfigService.ifacesByVplsName();
Luca Prete9c2ee072016-02-16 11:00:44 -0800158
nosignal5fd282e2016-09-16 16:11:40 -0700159 Set<String> vplsAffectedByApi =
Luca Prete092e8952016-10-26 16:25:56 +0200160 new HashSet<>(vplsConfigService.vplsAffectedByApi());
Luca Prete9c2ee072016-02-16 11:00:44 -0800161
nosignal5fd282e2016-09-16 16:11:40 -0700162 if (isNetworkConfigEvent && vplsAffectedByApi.isEmpty()) {
Luca Prete092e8952016-10-26 16:25:56 +0200163 vplsAffectedByApi.addAll(vplsConfigService.vplsNamesOld());
nosignal5fd282e2016-09-16 16:11:40 -0700164 }
Yi Tseng28767f02016-09-13 04:27:20 -0700165
Luca Prete092e8952016-10-26 16:25:56 +0200166 networkInterfaces.asMap().forEach((vplsName, interfaces) -> {
nosignal5fd282e2016-09-16 16:11:40 -0700167 Set<Host> hosts = Sets.newHashSet();
168 interfaces.forEach(intf -> {
169 // Add hosts that belongs to the specific VPLS
170 hostService.getConnectedHosts(intf.connectPoint())
171 .stream()
172 .filter(host -> host.vlan().equals(intf.vlan()))
173 .forEach(hosts::add);
174 });
175
Luca Prete092e8952016-10-26 16:25:56 +0200176 EncapsulationType encap =
177 vplsConfigService.encap(vplsName);
178
179 setupConnectivity(vplsName, interfaces, hosts, encap,
Carolina Fernandezb1cef5c2016-11-22 19:18:40 +0100180 vplsAffectedByApi.contains(vplsName));
Luca Prete092e8952016-10-26 16:25:56 +0200181 vplsAffectedByApi.remove(vplsName);
nosignal5fd282e2016-09-16 16:11:40 -0700182 });
183
184 if (!vplsAffectedByApi.isEmpty()) {
Luca Prete092e8952016-10-26 16:25:56 +0200185 for (String vplsName : vplsAffectedByApi) {
186 withdrawIntents(vplsName, Lists.newArrayList());
nosignal5fd282e2016-09-16 16:11:40 -0700187 }
188 }
Luca Prete9c2ee072016-02-16 11:00:44 -0800189 }
190
191 /**
nosignal5fd282e2016-09-16 16:11:40 -0700192 * Sets up connectivity for specific VPLS.
Luca Prete9c2ee072016-02-16 11:00:44 -0800193 *
Carolina Fernandezb1cef5c2016-11-22 19:18:40 +0100194 * @param vplsName the VPLS name
195 * @param interfaces the interfaces that belong to the VPLS
196 * @param hosts the hosts that belong to the VPLS
197 * @param encap the encapsulation type
nosignal5fd282e2016-09-16 16:11:40 -0700198 * @param affectedByApi true if this function is triggered from the APIs;
199 * false otherwise
Luca Prete9c2ee072016-02-16 11:00:44 -0800200 */
Luca Prete092e8952016-10-26 16:25:56 +0200201 private void setupConnectivity(String vplsName,
nosignal5fd282e2016-09-16 16:11:40 -0700202 Collection<Interface> interfaces,
203 Set<Host> hosts,
Luca Prete092e8952016-10-26 16:25:56 +0200204 EncapsulationType encap,
nosignal5fd282e2016-09-16 16:11:40 -0700205 boolean affectedByApi) {
Carolina Fernandezb1cef5c2016-11-22 19:18:40 +0100206
nosignal5fd282e2016-09-16 16:11:40 -0700207 List<Intent> intents = Lists.newArrayList();
208 List<Key> keys = Lists.newArrayList();
209 Set<FilteredConnectPoint> fcPoints = buildFCPoints(interfaces);
Luca Prete9c2ee072016-02-16 11:00:44 -0800210
nosignal5fd282e2016-09-16 16:11:40 -0700211 intents.addAll(buildBroadcastIntents(
Luca Prete092e8952016-10-26 16:25:56 +0200212 vplsName, fcPoints, encap, affectedByApi));
213 intents.addAll(buildUnicastIntents(
214 vplsName, hosts, fcPoints, encap, affectedByApi));
Luca Prete9c2ee072016-02-16 11:00:44 -0800215
nosignal5fd282e2016-09-16 16:11:40 -0700216 if (affectedByApi) {
217 intents.forEach(intent -> keys.add(intent.key()));
Luca Prete092e8952016-10-26 16:25:56 +0200218 withdrawIntents(vplsName, keys);
nosignal5fd282e2016-09-16 16:11:40 -0700219 }
220
221 intentInstaller.submitIntents(intents);
Luca Prete9c2ee072016-02-16 11:00:44 -0800222 }
223
224 /**
nosignal5fd282e2016-09-16 16:11:40 -0700225 * Withdraws intents belonging to a VPLS, given a VPLS name.
Luca Prete9c2ee072016-02-16 11:00:44 -0800226 *
Luca Prete092e8952016-10-26 16:25:56 +0200227 * @param vplsName the VPLS name
Carolina Fernandezb1cef5c2016-11-22 19:18:40 +0100228 * @param keys the keys of the intents to be installed
Luca Prete9c2ee072016-02-16 11:00:44 -0800229 */
Luca Prete092e8952016-10-26 16:25:56 +0200230 private void withdrawIntents(String vplsName, List<Key> keys) {
nosignal5fd282e2016-09-16 16:11:40 -0700231 List<Intent> intents = Lists.newArrayList();
Luca Prete9c2ee072016-02-16 11:00:44 -0800232
Luca Prete092e8952016-10-26 16:25:56 +0200233 intentInstaller.getIntentsFromVpls(vplsName)
nosignal5fd282e2016-09-16 16:11:40 -0700234 .forEach(intent -> {
235 if (!keys.contains(intent.key())) {
236 intents.add(intent);
237 }
Carolina Fernandezb1cef5c2016-11-22 19:18:40 +0100238 });
Luca Prete9c2ee072016-02-16 11:00:44 -0800239
nosignal5fd282e2016-09-16 16:11:40 -0700240 intentInstaller.withdrawIntents(intents);
Luca Prete9c2ee072016-02-16 11:00:44 -0800241 }
242
nosignal5fd282e2016-09-16 16:11:40 -0700243 /**
244 * Sets up broadcast intents between any given filtered connect point.
245 *
Carolina Fernandezb1cef5c2016-11-22 19:18:40 +0100246 * @param vplsName the VPLS name
247 * @param fcPoints the set of filtered connect points
248 * @param encap the encapsulation type
nosignal5fd282e2016-09-16 16:11:40 -0700249 * @param affectedByApi true if the function triggered from APIs;
250 * false otherwise
251 * @return the set of broadcast intents
252 */
Luca Prete092e8952016-10-26 16:25:56 +0200253 private Set<Intent> buildBroadcastIntents(String vplsName,
nosignal5fd282e2016-09-16 16:11:40 -0700254 Set<FilteredConnectPoint> fcPoints,
Luca Prete092e8952016-10-26 16:25:56 +0200255 EncapsulationType encap,
nosignal5fd282e2016-09-16 16:11:40 -0700256 boolean affectedByApi) {
257 Set<Intent> intents = Sets.newHashSet();
258 fcPoints.forEach(point -> {
259 Set<FilteredConnectPoint> otherPoints =
260 fcPoints.stream()
261 .filter(fcp -> !fcp.equals(point))
262 .collect(Collectors.toSet());
263
264 Key brcKey = intentInstaller.buildKey(PREFIX_BROADCAST,
265 point.connectPoint(),
Luca Prete092e8952016-10-26 16:25:56 +0200266 vplsName,
nosignal5fd282e2016-09-16 16:11:40 -0700267 MacAddress.BROADCAST);
268
Luca Prete092e8952016-10-26 16:25:56 +0200269 if ((!intentInstaller.intentExists(brcKey) || affectedByApi)
Carolina Fernandezb1cef5c2016-11-22 19:18:40 +0100270 && !otherPoints.isEmpty()) {
nosignal5fd282e2016-09-16 16:11:40 -0700271 intents.add(intentInstaller.buildBrcIntent(brcKey,
272 point,
Luca Prete092e8952016-10-26 16:25:56 +0200273 otherPoints,
274 encap));
Yi Tsengbf8b67e2016-09-01 15:02:11 +0800275 }
276 });
nosignal5fd282e2016-09-16 16:11:40 -0700277
278 return ImmutableSet.copyOf(intents);
279 }
280
281 /**
282 * Sets up unicast intents between any given filtered connect point.
283 *
Carolina Fernandezb1cef5c2016-11-22 19:18:40 +0100284 * @param vplsName the VPLS name
285 * @param hosts the set of destination hosts
286 * @param fcPoints the set of filtered connect points
287 * @param encap the encapsulation type
nosignal5fd282e2016-09-16 16:11:40 -0700288 * @param affectedByApi true if the function triggered from APIs;
289 * false otherwise
290 * @return the set of unicast intents
291 */
Luca Prete092e8952016-10-26 16:25:56 +0200292 private Set<Intent> buildUnicastIntents(String vplsName,
nosignal5fd282e2016-09-16 16:11:40 -0700293 Set<Host> hosts,
294 Set<FilteredConnectPoint> fcPoints,
Luca Prete092e8952016-10-26 16:25:56 +0200295 EncapsulationType encap,
nosignal5fd282e2016-09-16 16:11:40 -0700296 boolean affectedByApi) {
297 Set<Intent> intents = Sets.newHashSet();
298 hosts.forEach(host -> {
299 FilteredConnectPoint hostPoint = getHostPoint(host, fcPoints);
300
301 if (hostPoint == null) {
302 log.warn(HOST_FCP_NOT_FOUND, host);
303 return;
304 }
305
306 Set<FilteredConnectPoint> otherPoints =
307 fcPoints.stream()
308 .filter(fcp -> !fcp.equals(hostPoint))
309 .collect(Collectors.toSet());
310
311 Key uniKey = intentInstaller.buildKey(PREFIX_UNICAST,
312 host.location(),
Luca Prete092e8952016-10-26 16:25:56 +0200313 vplsName,
nosignal5fd282e2016-09-16 16:11:40 -0700314 host.mac());
315
316 if ((!intentInstaller.intentExists(uniKey) || affectedByApi) &&
317 !otherPoints.isEmpty()) {
318 intents.add(intentInstaller.buildUniIntent(uniKey,
319 otherPoints,
320 hostPoint,
Luca Prete092e8952016-10-26 16:25:56 +0200321 host,
322 encap));
nosignal5fd282e2016-09-16 16:11:40 -0700323 }
324 });
325
326 return ImmutableSet.copyOf(intents);
327 }
328
329 /**
Carolina Fernandezb1cef5c2016-11-22 19:18:40 +0100330 * Returns the filtered connect point associated to a given host.
nosignal5fd282e2016-09-16 16:11:40 -0700331 *
332 * @param host the target host
333 * @param fcps the filtered connected points
334 * @return null if not found; the filtered connect point otherwise
335 */
336 private FilteredConnectPoint getHostPoint(Host host,
337 Set<FilteredConnectPoint> fcps) {
338 return fcps.stream()
339 .filter(fcp -> fcp.connectPoint().equals(host.location()))
340 .filter(fcp -> {
341 VlanIdCriterion vlanCriterion =
342 (VlanIdCriterion) fcp.trafficSelector().
343 getCriterion(Criterion.Type.VLAN_VID);
Carolina Fernandezb1cef5c2016-11-22 19:18:40 +0100344 return vlanCriterion == null ||
nosignal5fd282e2016-09-16 16:11:40 -0700345 vlanCriterion.vlanId().equals(host.vlan());
346 })
347 .findFirst()
348 .orElse(null);
349 }
350
351 /**
352 * Computes a set of filtered connect points from a list of given interfaces.
353 *
354 * @param interfaces the interfaces to compute
355 * @return the set of filtered connect points
356 */
357 private Set<FilteredConnectPoint> buildFCPoints(Collection<Interface> interfaces) {
Luca Prete092e8952016-10-26 16:25:56 +0200358 // Build all filtered connected points in the VPLS
nosignal5fd282e2016-09-16 16:11:40 -0700359 return interfaces
360 .stream()
361 .map(intf -> {
362 TrafficSelector.Builder selectorBuilder =
363 DefaultTrafficSelector.builder();
nosignal5fd282e2016-09-16 16:11:40 -0700364 if (!intf.vlan().equals(VlanId.NONE)) {
365 selectorBuilder.matchVlanId(intf.vlan());
366 }
nosignal5fd282e2016-09-16 16:11:40 -0700367 return new FilteredConnectPoint(intf.connectPoint(),
368 selectorBuilder.build());
369 })
370 .collect(Collectors.toSet());
Luca Prete9c2ee072016-02-16 11:00:44 -0800371 }
372
373 /**
374 * Listener for host events.
375 */
nosignal5fd282e2016-09-16 16:11:40 -0700376 private class InternalHostListener implements HostListener {
Luca Prete9c2ee072016-02-16 11:00:44 -0800377 @Override
378 public void event(HostEvent event) {
nosignal5fd282e2016-09-16 16:11:40 -0700379 log.debug(HOST_EVENT, event);
Luca Prete9c2ee072016-02-16 11:00:44 -0800380 switch (event.type()) {
381 case HOST_ADDED:
382 case HOST_UPDATED:
383 case HOST_REMOVED:
nosignal5fd282e2016-09-16 16:11:40 -0700384 setupConnectivity(false);
Luca Prete9c2ee072016-02-16 11:00:44 -0800385 break;
nosignal5fd282e2016-09-16 16:11:40 -0700386
Luca Prete9c2ee072016-02-16 11:00:44 -0800387 default:
388 break;
389 }
390 }
391 }
Luca Pretea8854822016-04-26 16:30:55 -0700392
393 /**
394 * Listener for interface configuration events.
395 */
396 private class InternalInterfaceListener implements InterfaceListener {
397 @Override
398 public void event(InterfaceEvent event) {
nosignal5fd282e2016-09-16 16:11:40 -0700399 log.debug(INTF_CONF_EVENT, event);
Luca Pretea8854822016-04-26 16:30:55 -0700400 switch (event.type()) {
401 case INTERFACE_ADDED:
402 case INTERFACE_UPDATED:
403 case INTERFACE_REMOVED:
nosignal5fd282e2016-09-16 16:11:40 -0700404 setupConnectivity(false);
Luca Pretea8854822016-04-26 16:30:55 -0700405 break;
406 default:
407 break;
408 }
409 }
410 }
nosignal5fd282e2016-09-16 16:11:40 -0700411
412 /**
413 * Listener for VPLS configuration events.
414 */
415 private class InternalNetworkConfigListener implements NetworkConfigListener {
416 @Override
417 public void event(NetworkConfigEvent event) {
Carolina Fernandezb1cef5c2016-11-22 19:18:40 +0100418 if (event.configClass() == VplsConfigService.CONFIG_CLASS) {
nosignal5fd282e2016-09-16 16:11:40 -0700419 log.debug(NET_CONF_EVENT, event.configClass());
420 switch (event.type()) {
421 case CONFIG_ADDED:
422 case CONFIG_UPDATED:
423 case CONFIG_REMOVED:
424 setupConnectivity(true);
425 break;
nosignal5fd282e2016-09-16 16:11:40 -0700426 default:
427 break;
428 }
429 }
430 }
431 }
Luca Prete9c2ee072016-02-16 11:00:44 -0800432}