X-Git-Url: http://git.ipfire.org/?p=people%2Fteissler%2Fipfire-2.x.git;a=blobdiff_plain;f=config%2Fcfgroot%2Fgeneral-functions.pl;fp=config%2Fcfgroot%2Fgeneral-functions.pl;h=6994f333d5a84c48ed57aa9155b04b34a0c818f5;hp=1ef014a66cf67d303f8a32cf8dd2da5786542d5a;hb=4cb523d4626f923f6b499ba99a8cb51f7c37f74b;hpb=dc74d0fd94fe187367d91ac74343ea51353e8493 diff --git a/config/cfgroot/general-functions.pl b/config/cfgroot/general-functions.pl index 1ef014a66..6994f333d 100644 --- a/config/cfgroot/general-functions.pl +++ b/config/cfgroot/general-functions.pl @@ -1187,4 +1187,16 @@ sub firewall_reload() { system("/usr/local/bin/firewallctrl"); } +# Function which will return the used interface for the red network zone (red0, ppp0, etc). +sub get_red_interface() { + + open(IFACE, "${General::swroot}/red/iface") or die "Could not open /var/ipfire/red/iface"; + + my $interface = ; + close(IFACE); + chomp $interface; + + return $interface; +} + 1;