find public interface in /sys/class/net
This commit is contained in:
parent
26fe6414ce
commit
ced1f7a00a
@ -238,11 +238,11 @@ public class PacProcessorFactory implements EntityProcessorFactory {
|
||||
return new CompoundProcessor(
|
||||
new ShellProcessor("ip addr add "
|
||||
+ pac.getCurINetAddr().getInet4Addr()
|
||||
+ "/32 dev eth0"
|
||||
+ "/32 dev $( ls /sys/class/net/ | egrep -o '(eth0|pub)' )"
|
||||
),
|
||||
new ShellProcessor("ip addr add "
|
||||
+ pac.getCurINetAddr().getInet6Addr()
|
||||
+ "/128 dev eth0 noprefixroute preferred_lft 0"
|
||||
+ "/128 dev $( ls /sys/class/net/ | egrep -o '(eth0|pub)' ) noprefixroute preferred_lft 0"
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -251,11 +251,11 @@ public class PacProcessorFactory implements EntityProcessorFactory {
|
||||
return new CompoundProcessor(
|
||||
new ShellProcessor("ip addr del "
|
||||
+ pac.getCurINetAddr().getInet4Addr()
|
||||
+ "/32 dev eth0"
|
||||
+ "/32 dev $( ls /sys/class/net/ | egrep -o '(eth0|pub)' )"
|
||||
),
|
||||
new ShellProcessor("ip addr del "
|
||||
+ pac.getCurINetAddr().getInet6Addr()
|
||||
+ "/128 dev eth0 noprefixroute preferred_lft 0"
|
||||
+ "/128 dev $( ls /sys/class/net/ | egrep -o '(eth0|pub)' ) noprefixroute preferred_lft 0"
|
||||
)
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user