sedlo |
Subversion Repositories: |
Compare with Previous - Blame - Download
--- /home/sojka/czfree/sedlo/sedlo-0.0.3pre4 2004-11-04 16:52:10.000000000 +0100
+++ sedlo-0.0.3pre4-myigw 2004-11-04 16:59:07.000000000 +0100
@@ -45,6 +45,7 @@
fi
sl_murlcfg=`cat $sl_sedlocnf | grep "^mcnf" | uniq | awk '{print $2}'`
+sl_local_conf_myigw=`awk '/^myigw/ { print $2 "*" $3 "*" $4 }' < $sl_sedlocnf`
######################################################################
s_flqq()
@@ -84,7 +85,11 @@
sl_ips=`$sl_catcmd $sl_sedlocache/$sl_nmcnf | $sl_grepcmd "^ip" | $sl_awkcmd '{print $2"*"$4"*"$5"*"$6}'`
-for sl_ip in $sl_ips
+this_router="THIS_ROUTER*$sl_local_conf_myigw"
+
+# $this_router format: THIS_ROUTER*igw1name*igw2name*igw3name
+
+for sl_ip in $this_router $sl_ips
do
sl_ipn=`echo $sl_ip | $sl_awkcmd -F '*' '{print $1}'`
sl_ipgws=`echo $sl_ip | $sl_awkcmd -F '*' '{print $2,$3,$4}'`
@@ -95,7 +100,12 @@
if [ "$sl_tbl x" != " x" ] && [ "$sl_ok" = "no" ]
then
if [ $scm_info -gt 1 ]; then echo "Creating new rules to send $sl_ipn to table $sl_ipgw" ; fi
- $sl_ipcmd ru add from $sl_ipn lookup $sl_ipgw
+ case "$sl_ipn" in
+ "THIS_ROUTER")
+ $sl_ipcmd ru add iif lo table $sl_ipgw ;;
+ *)
+ $sl_ipcmd ru add from $sl_ipn table $sl_ipgw ;;
+ esac
sl_ok="yes"
else
if [ "$sl_ok" = "no" ]