()
| 1937 | r = _run(['ip', 'link', 'del', _DHCP_SNOOP_BRIDGE], timeout=5) |
| 1938 | if r['rc'] not in (0, 1): |
| 1939 | return {'success': False, 'error': r['err'] or 'failed to remove bridge'} |
| 1940 | return {'success': True, 'destroyed': True} |
| 1941 | |
| 1942 | # ---- create: validate hard before touching any link -------------------- |
| 1943 | default_if = _default_route_iface() |
| 1944 | for i in (iface_a, iface_b): |
| 1945 | if not _valid_iface(i): |
| 1946 | return {'success': False, 'error': f'invalid interface {i!r}'} |
| 1947 | if not _DHCP_SNOOP_WIRED_RE.match(i) or _is_wireless(i): |
| 1948 | return {'success': False, 'error': f'{i} is not an eligible wired NIC'} |
nothing calls this directly
no test coverage detected