diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2007-08-03 17:59:13 +0000 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2007-08-03 17:59:13 +0000 |
commit | ca694c614d77d7733ab68e64294aa46c0b69bdb9 (patch) | |
tree | 2865a9a71f1e3dea34c94b364d6480f517a28410 | |
parent | f7b49faa517a1e248f452ee3931b32fd70a806ab (diff) | |
download | strongswan-ca694c614d77d7733ab68e64294aa46c0b69bdb9.tar.bz2 strongswan-ca694c614d77d7733ab68e64294aa46c0b69bdb9.tar.xz |
improved source routing table creation
-rwxr-xr-x | src/_updown/_updown | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/_updown/_updown b/src/_updown/_updown index 4cf271742..0fadc7690 100755 --- a/src/_updown/_updown +++ b/src/_updown/_updown @@ -241,12 +241,12 @@ doroute() { if test "$1" = "add" then addsource - if [ `ip rule list | grep "lookup ${SOURCEIP_ROUTING_TABLE}" | wc -l` -eq 0 ] + if ! ip rule list | grep -q "lookup $SOURCEIP_ROUTING_TABLE" then - ip rule add pref ${SOURCEIP_ROUTING_TABLE_PRIO} table ${SOURCEIP_ROUTING_TABLE} + ip rule add pref $SOURCEIP_ROUTING_TABLE_PRIO table $SOURCEIP_ROUTING_TABLE fi fi - parms3="$parms3 src ${PLUTO_MY_SOURCEIP%/*} table ${SOURCEIP_ROUTING_TABLE}" + parms3="$parms3 src ${PLUTO_MY_SOURCEIP%/*} table $SOURCEIP_ROUTING_TABLE" fi case "$PLUTO_PEER_CLIENT_NET/$PLUTO_PEER_CLIENT_MASK" in |