From ced1f7a00ad923aa64355e6fdab4f5fc579a44ef Mon Sep 17 00:00:00 2001 From: Peter Hormanns Date: Mon, 6 Mar 2023 12:04:09 +0100 Subject: [PATCH] find public interface in /sys/class/net --- hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java b/hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java index 9af59a7..40c9900 100644 --- a/hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java +++ b/hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java @@ -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" ) ); }