MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / net_traceroute

Function net_traceroute

network_diagnostics.py:1939–1945  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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'}

Callers

nothing calls this directly

Calls 5

_valid_targetFunction · 0.85
_badFunction · 0.85
_logFunction · 0.85
do_tracerouteFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected