Skip to content

Commit

Permalink
Merge pull request #44 from SimonTate/ip-dev-show-iface
Browse files Browse the repository at this point in the history
Fix ip n s dev <iface>
  • Loading branch information
brona authored Sep 18, 2022
2 parents 507c3c3 + 6813708 commit 24e2312
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/ip.py
Original file line number Diff line number Diff line change
Expand Up @@ -653,9 +653,12 @@ def do_neigh_show(argv, af):
neighs.append(entry)

if af != 6:
idev = ("i " + dev) if dev else ""
args = [ARP, "-anl" ]
if dev:
args += [ "-i", dev ]

res = subprocess.run(
[ARP, "-anl" + idev], capture_output=True, text=True, check=True
args, capture_output=True, text=True, check=True
)
for row in res.stdout.splitlines()[1:]:
cols = row.split()
Expand Down

0 comments on commit 24e2312

Please sign in to comment.