We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8dd77e7 commit 28d3a47Copy full SHA for 28d3a47
1 file changed
lib/phut/netns.rb
@@ -2,6 +2,7 @@
2
require 'phut/finder'
3
require 'phut/route'
4
require 'phut/shell_runner'
5
+require 'phut/veth'
6
7
module Phut
8
# `ip netns ...` command runner
@@ -62,8 +63,8 @@ def stop
62
63
end
64
65
def device
- if /^\d+: ([^@]+)@/ =~
66
- sudo("ip netns exec #{name} ip -o link show type veth")
+ if /^\d+: (#{Phut::Veth::PREFIX}[^@\.]+)@/ =~
67
+ sudo("ip netns exec #{name} ip -o link show")
68
Regexp.last_match(1)
69
70
0 commit comments