| Conditions | 7 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | #!/usr/bin/env python |
||
| 16 | def has_seen(port_map, frame): |
||
| 17 | # Can't digipeat anything when you are the source |
||
| 18 | for port in port_map.values(): |
||
| 19 | if frame['source'] == port['identifier']: |
||
| 20 | return True |
||
| 21 | |||
| 22 | # can't digipeat things we already digipeated. |
||
| 23 | for hop in frame['path']: |
||
| 24 | for port in port_map.values(): |
||
| 25 | if hop.startswith(port['identifier']) and hop.endswith('*'): |
||
| 26 | return True |
||
| 27 | |||
| 28 | return False |
||
| 29 |