blob: dbac596d0e31d17672ae2aea2a93418746edc263 [file] [log] [blame]
Thomas Vachuska58de4162015-09-10 16:15:33 -07001/*
Charles Chand6832882015-10-05 17:50:33 -07002 * Copyright 2014-2015 Open Networking Laboratory
Thomas Vachuska58de4162015-09-10 16:15:33 -07003 *
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
14 * limitations under the License.
15 */
Charles Chan0b4e6182015-11-03 10:42:14 -080016package org.onosproject.segmentrouting.config;
sanghob35a6192015-04-01 13:05:26 -070017
Charles Chan9f676b62015-10-29 14:58:10 -070018import com.google.common.collect.ImmutableSet;
sanghob35a6192015-04-01 13:05:26 -070019import org.onlab.packet.Ip4Address;
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -070020import org.onlab.packet.Ip4Prefix;
sanghob35a6192015-04-01 13:05:26 -070021import org.onlab.packet.MacAddress;
Charles Chan4636be02015-10-07 14:21:45 -070022import org.onosproject.incubator.net.config.basics.ConfigException;
23import org.onosproject.incubator.net.config.basics.InterfaceConfig;
24import org.onosproject.incubator.net.intf.Interface;
25import org.onosproject.net.ConnectPoint;
Charles Chand6832882015-10-05 17:50:33 -070026import org.onosproject.net.config.NetworkConfigRegistry;
Charles Chan4636be02015-10-07 14:21:45 -070027import org.onosproject.net.host.InterfaceIpAddress;
sanghob35a6192015-04-01 13:05:26 -070028import org.onosproject.net.DeviceId;
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -070029import org.onosproject.net.PortNumber;
sanghob35a6192015-04-01 13:05:26 -070030import org.slf4j.Logger;
31import org.slf4j.LoggerFactory;
32
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -070033import java.util.ArrayList;
sanghob35a6192015-04-01 13:05:26 -070034import java.util.HashMap;
Charles Chan531a78b2015-12-01 10:00:51 -080035import java.util.HashSet;
sanghob35a6192015-04-01 13:05:26 -070036import java.util.List;
37import java.util.Map;
Charles Chand6832882015-10-05 17:50:33 -070038import java.util.Set;
Saurav Das0e99e2b2015-10-28 12:39:42 -070039import java.util.concurrent.ConcurrentHashMap;
sanghob35a6192015-04-01 13:05:26 -070040
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -070041/**
42 * Segment Routing configuration component that reads the
43 * segment routing related configuration from Network Configuration Manager
44 * component and organizes in more accessible formats.
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -070045 */
sanghob35a6192015-04-01 13:05:26 -070046public class DeviceConfiguration implements DeviceProperties {
47
48 private static final Logger log = LoggerFactory
49 .getLogger(DeviceConfiguration.class);
Sho SHIMIZU6cfc02d2015-09-11 11:19:11 -070050 private final List<Integer> allSegmentIds = new ArrayList<>();
Saurav Das0e99e2b2015-10-28 12:39:42 -070051 private final ConcurrentHashMap<DeviceId, SegmentRouterInfo> deviceConfigMap
52 = new ConcurrentHashMap<>();
sanghob35a6192015-04-01 13:05:26 -070053
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -070054 private class SegmentRouterInfo {
55 int nodeSid;
56 DeviceId deviceId;
57 Ip4Address ip;
58 MacAddress mac;
59 boolean isEdge;
60 HashMap<PortNumber, Ip4Address> gatewayIps;
61 HashMap<PortNumber, Ip4Prefix> subnets;
Charles Chan531a78b2015-12-01 10:00:51 -080062 Map<Integer, Set<Integer>> adjacencySids;
Charles Chanb8e10c82015-10-14 11:24:40 -070063
64 public SegmentRouterInfo() {
65 this.gatewayIps = new HashMap<>();
66 this.subnets = new HashMap<>();
67 }
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -070068 }
sanghob35a6192015-04-01 13:05:26 -070069
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -070070 /**
71 * Constructor. Reads all the configuration for all devices of type
72 * Segment Router and organizes into various maps for easier access.
Brian O'Connor52515622015-10-09 17:03:44 -070073 *
74 * @param cfgService config service
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -070075 */
Charles Chand6832882015-10-05 17:50:33 -070076 public DeviceConfiguration(NetworkConfigRegistry cfgService) {
Charles Chan4636be02015-10-07 14:21:45 -070077 // Read config from device subject, excluding gatewayIps and subnets.
78 Set<DeviceId> deviceSubjects =
Charles Chand6832882015-10-05 17:50:33 -070079 cfgService.getSubjects(DeviceId.class, SegmentRoutingConfig.class);
Charles Chan4636be02015-10-07 14:21:45 -070080 deviceSubjects.forEach(subject -> {
Charles Chand6832882015-10-05 17:50:33 -070081 SegmentRoutingConfig config =
82 cfgService.getConfig(subject, SegmentRoutingConfig.class);
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -070083 SegmentRouterInfo info = new SegmentRouterInfo();
Charles Chand6832882015-10-05 17:50:33 -070084 info.deviceId = subject;
Charles Chan531a78b2015-12-01 10:00:51 -080085 info.nodeSid = config.nodeSid();
86 info.ip = config.routerIp();
87 info.mac = config.routerMac();
Charles Chand6832882015-10-05 17:50:33 -070088 info.isEdge = config.isEdgeRouter();
Charles Chan531a78b2015-12-01 10:00:51 -080089 info.adjacencySids = config.adjacencySids();
Charles Chand6832882015-10-05 17:50:33 -070090
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -070091 this.deviceConfigMap.put(info.deviceId, info);
92 this.allSegmentIds.add(info.nodeSid);
Charles Chand6832882015-10-05 17:50:33 -070093 });
Charles Chan4636be02015-10-07 14:21:45 -070094
95 // Read gatewayIps and subnets from port subject.
96 Set<ConnectPoint> portSubjects =
97 cfgService.getSubjects(ConnectPoint.class, InterfaceConfig.class);
98 portSubjects.forEach(subject -> {
99 InterfaceConfig config =
100 cfgService.getConfig(subject, InterfaceConfig.class);
101 Set<Interface> networkInterfaces;
102 try {
103 networkInterfaces = config.getInterfaces();
104 } catch (ConfigException e) {
105 log.error("Error loading port configuration");
106 return;
107 }
108 networkInterfaces.forEach(networkInterface -> {
109 DeviceId dpid = networkInterface.connectPoint().deviceId();
110 PortNumber port = networkInterface.connectPoint().port();
111 SegmentRouterInfo info = this.deviceConfigMap.get(dpid);
112
Charles Chanb8e10c82015-10-14 11:24:40 -0700113 // skip if there is no corresponding device for this ConenctPoint
114 if (info != null) {
115 Set<InterfaceIpAddress> interfaceAddresses = networkInterface.ipAddresses();
116 interfaceAddresses.forEach(interfaceAddress -> {
117 info.gatewayIps.put(port, interfaceAddress.ipAddress().getIp4Address());
118 info.subnets.put(port, interfaceAddress.subnetAddress().getIp4Prefix());
119 });
120 }
Charles Chan4636be02015-10-07 14:21:45 -0700121 });
122
123 });
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -0700124 }
125
sanghob35a6192015-04-01 13:05:26 -0700126 @Override
Charles Chan0b4e6182015-11-03 10:42:14 -0800127 public boolean isConfigured(DeviceId deviceId) {
128 return deviceConfigMap.get(deviceId) != null;
129 }
130
131 @Override
132 public int getSegmentId(DeviceId deviceId) throws DeviceConfigNotFoundException {
Saurav Das0e99e2b2015-10-28 12:39:42 -0700133 SegmentRouterInfo srinfo = deviceConfigMap.get(deviceId);
134 if (srinfo != null) {
135 log.trace("getSegmentId for device{} is {}", deviceId, srinfo.nodeSid);
136 return srinfo.nodeSid;
sanghob35a6192015-04-01 13:05:26 -0700137 } else {
Charles Chan0b4e6182015-11-03 10:42:14 -0800138 String message = "getSegmentId fails for device: " + deviceId + ".";
139 throw new DeviceConfigNotFoundException(message);
sanghob35a6192015-04-01 13:05:26 -0700140 }
141 }
142
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -0700143 /**
Saurav Das822c4e22015-10-23 10:51:11 -0700144 * Returns the Node segment id of a segment router given its Router mac address.
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -0700145 *
146 * @param routerMac router mac address
Saurav Das0e99e2b2015-10-28 12:39:42 -0700147 * @return node segment id, or -1 if not found in config
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -0700148 */
149 public int getSegmentId(MacAddress routerMac) {
150 for (Map.Entry<DeviceId, SegmentRouterInfo> entry:
151 deviceConfigMap.entrySet()) {
152 if (entry.getValue().mac.equals(routerMac)) {
153 return entry.getValue().nodeSid;
154 }
155 }
sanghob35a6192015-04-01 13:05:26 -0700156
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -0700157 return -1;
158 }
159
160 /**
Saurav Das822c4e22015-10-23 10:51:11 -0700161 * Returns the Node segment id of a segment router given its Router ip address.
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -0700162 *
163 * @param routerAddress router ip address
Saurav Das0e99e2b2015-10-28 12:39:42 -0700164 * @return node segment id, or -1 if not found in config
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -0700165 */
166 public int getSegmentId(Ip4Address routerAddress) {
167 for (Map.Entry<DeviceId, SegmentRouterInfo> entry:
168 deviceConfigMap.entrySet()) {
169 if (entry.getValue().ip.equals(routerAddress)) {
170 return entry.getValue().nodeSid;
171 }
172 }
173
174 return -1;
175 }
176
sanghob35a6192015-04-01 13:05:26 -0700177 @Override
Charles Chan0b4e6182015-11-03 10:42:14 -0800178 public MacAddress getDeviceMac(DeviceId deviceId) throws DeviceConfigNotFoundException {
Saurav Das0e99e2b2015-10-28 12:39:42 -0700179 SegmentRouterInfo srinfo = deviceConfigMap.get(deviceId);
180 if (srinfo != null) {
181 log.trace("getDeviceMac for device{} is {}", deviceId, srinfo.mac);
182 return srinfo.mac;
sanghob35a6192015-04-01 13:05:26 -0700183 } else {
Charles Chan0b4e6182015-11-03 10:42:14 -0800184 String message = "getDeviceMac fails for device: " + deviceId + ".";
185 throw new DeviceConfigNotFoundException(message);
sanghob35a6192015-04-01 13:05:26 -0700186 }
187 }
188
Charles Chan0b4e6182015-11-03 10:42:14 -0800189 @Override
190 public Ip4Address getRouterIp(DeviceId deviceId) throws DeviceConfigNotFoundException {
Saurav Das0e99e2b2015-10-28 12:39:42 -0700191 SegmentRouterInfo srinfo = deviceConfigMap.get(deviceId);
192 if (srinfo != null) {
193 log.trace("getDeviceIp for device{} is {}", deviceId, srinfo.ip);
194 return srinfo.ip;
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -0700195 } else {
Charles Chan0b4e6182015-11-03 10:42:14 -0800196 String message = "getRouterIp fails for device: " + deviceId + ".";
197 throw new DeviceConfigNotFoundException(message);
sanghob35a6192015-04-01 13:05:26 -0700198 }
sanghob35a6192015-04-01 13:05:26 -0700199 }
200
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -0700201 @Override
Charles Chan0b4e6182015-11-03 10:42:14 -0800202 public boolean isEdgeDevice(DeviceId deviceId) throws DeviceConfigNotFoundException {
Saurav Das0e99e2b2015-10-28 12:39:42 -0700203 SegmentRouterInfo srinfo = deviceConfigMap.get(deviceId);
204 if (srinfo != null) {
205 log.trace("isEdgeDevice for device{} is {}", deviceId, srinfo.isEdge);
206 return srinfo.isEdge;
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -0700207 } else {
Charles Chan0b4e6182015-11-03 10:42:14 -0800208 String message = "isEdgeDevice fails for device: " + deviceId + ".";
209 throw new DeviceConfigNotFoundException(message);
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -0700210 }
211 }
212
sanghob35a6192015-04-01 13:05:26 -0700213 @Override
214 public List<Integer> getAllDeviceSegmentIds() {
215 return allSegmentIds;
216 }
217
Charles Chanc42e84e2015-10-20 16:24:19 -0700218 @Override
219 public Map<Ip4Prefix, List<PortNumber>> getSubnetPortsMap(DeviceId deviceId) {
220 Map<Ip4Prefix, List<PortNumber>> subnetPortMap = new HashMap<>();
221
222 // Construct subnet-port mapping from port-subnet mapping
223 Map<PortNumber, Ip4Prefix> portSubnetMap =
224 this.deviceConfigMap.get(deviceId).subnets;
225 portSubnetMap.forEach((port, subnet) -> {
226 if (subnetPortMap.containsKey(subnet)) {
227 subnetPortMap.get(subnet).add(port);
228 } else {
229 ArrayList<PortNumber> ports = new ArrayList<>();
230 ports.add(port);
231 subnetPortMap.put(subnet, ports);
232 }
233 });
234
235 return subnetPortMap;
236 }
237
sanghob35a6192015-04-01 13:05:26 -0700238 /**
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -0700239 * Returns the device identifier or data plane identifier (dpid)
240 * of a segment router given its segment id.
sanghob35a6192015-04-01 13:05:26 -0700241 *
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -0700242 * @param sid segment id
243 * @return deviceId device identifier
sanghob35a6192015-04-01 13:05:26 -0700244 */
245 public DeviceId getDeviceId(int sid) {
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -0700246 for (Map.Entry<DeviceId, SegmentRouterInfo> entry:
247 deviceConfigMap.entrySet()) {
248 if (entry.getValue().nodeSid == sid) {
249 return entry.getValue().deviceId;
sanghob35a6192015-04-01 13:05:26 -0700250 }
251 }
252
253 return null;
254 }
255
256 /**
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -0700257 * Returns the device identifier or data plane identifier (dpid)
258 * of a segment router given its router ip address.
sanghob35a6192015-04-01 13:05:26 -0700259 *
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -0700260 * @param ipAddress router ip address
261 * @return deviceId device identifier
sanghob35a6192015-04-01 13:05:26 -0700262 */
263 public DeviceId getDeviceId(Ip4Address ipAddress) {
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -0700264 for (Map.Entry<DeviceId, SegmentRouterInfo> entry:
265 deviceConfigMap.entrySet()) {
266 if (entry.getValue().ip.equals(ipAddress)) {
267 return entry.getValue().deviceId;
sanghob35a6192015-04-01 13:05:26 -0700268 }
269 }
270
271 return null;
272 }
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -0700273
274 /**
Saurav Das822c4e22015-10-23 10:51:11 -0700275 * Returns the configured port ip addresses for a segment router.
276 * These addresses serve as gateway IP addresses for the subnets configured
277 * on those ports.
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -0700278 *
279 * @param deviceId device identifier
Saurav Das837e0bb2015-10-30 17:45:38 -0700280 * @return immutable set of ip addresses configured on the ports or null if not found
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -0700281 */
Saurav Das837e0bb2015-10-30 17:45:38 -0700282 public Set<Ip4Address> getPortIPs(DeviceId deviceId) {
Saurav Das0e99e2b2015-10-28 12:39:42 -0700283 SegmentRouterInfo srinfo = deviceConfigMap.get(deviceId);
284 if (srinfo != null) {
285 log.trace("getSubnetGatewayIps for device{} is {}", deviceId,
286 srinfo.gatewayIps.values());
Saurav Das837e0bb2015-10-30 17:45:38 -0700287 return ImmutableSet.copyOf(srinfo.gatewayIps.values());
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -0700288 }
Saurav Das0e99e2b2015-10-28 12:39:42 -0700289 return null;
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -0700290 }
291
292 /**
Saurav Das822c4e22015-10-23 10:51:11 -0700293 * Returns the configured IP addresses per port
294 * for a segment router.
295 *
296 * @param deviceId device identifier
Saurav Das0e99e2b2015-10-28 12:39:42 -0700297 * @return map of port to gateway IP addresses or null if not found
Saurav Das822c4e22015-10-23 10:51:11 -0700298 */
299 public Map<PortNumber, Ip4Address> getPortIPMap(DeviceId deviceId) {
Saurav Das0e99e2b2015-10-28 12:39:42 -0700300 SegmentRouterInfo srinfo = deviceConfigMap.get(deviceId);
301 if (srinfo != null) {
302 return srinfo.gatewayIps;
Saurav Das822c4e22015-10-23 10:51:11 -0700303 }
304 return null;
305 }
306
307 /**
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -0700308 * Returns the configured subnet prefixes for a segment router.
309 *
310 * @param deviceId device identifier
Saurav Das0e99e2b2015-10-28 12:39:42 -0700311 * @return list of ip prefixes or null if not found
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -0700312 */
Charles Chan9f676b62015-10-29 14:58:10 -0700313 public Set<Ip4Prefix> getSubnets(DeviceId deviceId) {
Saurav Das0e99e2b2015-10-28 12:39:42 -0700314 SegmentRouterInfo srinfo = deviceConfigMap.get(deviceId);
315 if (srinfo != null) {
316 log.trace("getSubnets for device{} is {}", deviceId,
317 srinfo.subnets.values());
Charles Chan9f676b62015-10-29 14:58:10 -0700318 return ImmutableSet.copyOf(srinfo.subnets.values());
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -0700319 }
Saurav Das0e99e2b2015-10-28 12:39:42 -0700320 return null;
321 }
322
323 /**
324 * Returns the configured subnet on the given port, or null if no
325 * subnet has been configured on the port.
326 *
327 * @param deviceId device identifier
328 * @param pnum port identifier
329 * @return configured subnet on port, or null
330 */
331 public Ip4Prefix getPortSubnet(DeviceId deviceId, PortNumber pnum) {
332 SegmentRouterInfo srinfo = deviceConfigMap.get(deviceId);
333 if (srinfo != null) {
334 return srinfo.subnets.get(pnum);
335 }
336 return null;
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -0700337 }
338
339 /**
340 * Returns the router ip address of segment router that has the
341 * specified ip address in its subnets.
342 *
343 * @param destIpAddress target ip address
344 * @return router ip address
345 */
346 public Ip4Address getRouterIpAddressForASubnetHost(Ip4Address destIpAddress) {
347 for (Map.Entry<DeviceId, SegmentRouterInfo> entry:
348 deviceConfigMap.entrySet()) {
349 for (Ip4Prefix prefix:entry.getValue().subnets.values()) {
350 if (prefix.contains(destIpAddress)) {
351 return entry.getValue().ip;
352 }
353 }
354 }
355
356 log.debug("No router was found for {}", destIpAddress);
357 return null;
358 }
359
360 /**
361 * Returns the router mac address of segment router that has the
362 * specified ip address as one of its subnet gateway ip address.
363 *
364 * @param gatewayIpAddress router gateway ip address
Saurav Das0e99e2b2015-10-28 12:39:42 -0700365 * @return router mac address or null if not found
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -0700366 */
367 public MacAddress getRouterMacForAGatewayIp(Ip4Address gatewayIpAddress) {
368 for (Map.Entry<DeviceId, SegmentRouterInfo> entry:
369 deviceConfigMap.entrySet()) {
370 if (entry.getValue().gatewayIps.
371 values().contains(gatewayIpAddress)) {
372 return entry.getValue().mac;
373 }
374 }
375
376 log.debug("Cannot find a router for {}", gatewayIpAddress);
377 return null;
378 }
sangho666cd6d2015-04-14 16:27:13 -0700379
380
381 /**
382 * Checks if the host is in the subnet defined in the router with the
383 * device ID given.
384 *
385 * @param deviceId device identification of the router
386 * @param hostIp host IP address to check
387 * @return true if the host is within the subnet of the router,
388 * false if no subnet is defined under the router or if the host is not
389 * within the subnet defined in the router
390 */
391 public boolean inSameSubnet(DeviceId deviceId, Ip4Address hostIp) {
392
Charles Chan9f676b62015-10-29 14:58:10 -0700393 Set<Ip4Prefix> subnets = getSubnets(deviceId);
sangho666cd6d2015-04-14 16:27:13 -0700394 if (subnets == null) {
395 return false;
396 }
397
398 for (Ip4Prefix subnet: subnets) {
399 if (subnet.contains(hostIp)) {
400 return true;
401 }
402 }
403
404 return false;
405 }
sangho1e575652015-05-14 00:39:53 -0700406
407 /**
408 * Returns the ports corresponding to the adjacency Sid given.
409 *
410 * @param deviceId device identification of the router
411 * @param sid adjacency Sid
Charles Chan531a78b2015-12-01 10:00:51 -0800412 * @return set of port numbers
sangho1e575652015-05-14 00:39:53 -0700413 */
Charles Chan531a78b2015-12-01 10:00:51 -0800414 public Set<Integer> getPortsForAdjacencySid(DeviceId deviceId, int sid) {
Saurav Das0e99e2b2015-10-28 12:39:42 -0700415 SegmentRouterInfo srinfo = deviceConfigMap.get(deviceId);
Charles Chan531a78b2015-12-01 10:00:51 -0800416 return srinfo != null ?
417 ImmutableSet.copyOf(srinfo.adjacencySids.get(sid)) :
418 ImmutableSet.copyOf(new HashSet<>());
sangho1e575652015-05-14 00:39:53 -0700419 }
420
421 /**
422 * Check if the Sid given is whether adjacency Sid of the router device or not.
423 *
424 * @param deviceId device identification of the router
425 * @param sid Sid to check
426 * @return true if the Sid given is the adjacency Sid of the device,
427 * otherwise false
428 */
429 public boolean isAdjacencySid(DeviceId deviceId, int sid) {
Saurav Das0e99e2b2015-10-28 12:39:42 -0700430 SegmentRouterInfo srinfo = deviceConfigMap.get(deviceId);
Charles Chan531a78b2015-12-01 10:00:51 -0800431 return srinfo != null && srinfo.adjacencySids.containsKey(sid);
sangho1e575652015-05-14 00:39:53 -0700432 }
Charles Chand6832882015-10-05 17:50:33 -0700433}