1 | 18 | simandl | --- /home/sojka/czfree/sedlo/sedlo-0.0.3pre4 2004-11-04 16:52:10.000000000 +0100 |
2 | | | +++ sedlo-0.0.3pre4-myigw 2004-11-04 16:59:07.000000000 +0100 |
3 | | | @@ -45,6 +45,7 @@ |
4 | | | fi |
5 | | | |
6 | | | sl_murlcfg=`cat $sl_sedlocnf | grep "^mcnf" | uniq | awk '{print $2}'` |
7 | | | +sl_local_conf_myigw=`awk '/^myigw/ { print $2 "*" $3 "*" $4 }' < $sl_sedlocnf` |
8 | | | |
9 | | | ###################################################################### |
10 | | | s_flqq() |
11 | | | @@ -84,7 +85,11 @@ |
12 | | | |
13 | | | sl_ips=`$sl_catcmd $sl_sedlocache/$sl_nmcnf | $sl_grepcmd "^ip" | $sl_awkcmd '{print $2"*"$4"*"$5"*"$6}'` |
14 | | | |
15 | | | -for sl_ip in $sl_ips |
16 | | | +this_router="THIS_ROUTER*$sl_local_conf_myigw" |
17 | | | + |
18 | | | +# $this_router format: THIS_ROUTER*igw1name*igw2name*igw3name |
19 | | | + |
20 | | | +for sl_ip in $this_router $sl_ips |
21 | | | do |
22 | | | sl_ipn=`echo $sl_ip | $sl_awkcmd -F '*' '{print $1}'` |
23 | | | sl_ipgws=`echo $sl_ip | $sl_awkcmd -F '*' '{print $2,$3,$4}'` |
24 | | | @@ -95,7 +100,12 @@ |
25 | | | if [ "$sl_tbl x" != " x" ] && [ "$sl_ok" = "no" ] |
26 | | | then |
27 | | | if [ $scm_info -gt 1 ]; then echo "Creating new rules to send $sl_ipn to table $sl_ipgw" ; fi |
28 | | | - $sl_ipcmd ru add from $sl_ipn lookup $sl_ipgw |
29 | | | + case "$sl_ipn" in |
30 | | | + "THIS_ROUTER") |
31 | | | + $sl_ipcmd ru add iif lo table $sl_ipgw ;; |
32 | | | + *) |
33 | | | + $sl_ipcmd ru add from $sl_ipn table $sl_ipgw ;; |
34 | | | + esac |
35 | | | sl_ok="yes" |
36 | | | else |
37 | | | if [ "$sl_ok" = "no" ] |