Revision dbdc30ec flowspec/models.py

b/flowspec/models.py
263 263
                        logger.info('Icmp type fields do not match')
264 264
                except:
265 265
                    pass
266
                try:
267
                    assert(self.protocol)
268
                    assert(devicematch['protocol'][0])
269
                    if self.protocol == devicematch['protocol'][0]:
270
                        found = found and True
271
                        logger.info('Found a matching protocol')
272
                    else:
273
                        found = False
274
                        logger.info('Protocol fields do not match')
275
                except:
276
                    pass
277 266
                if found and self.status != "ACTIVE":
278 267
                    logger.error('Rule is applied on device but appears as offline')
279 268
                    self.status = "ACTIVE"

Also available in: Unified diff