Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: vpnc: devel

[PATCH] support route metric

 

 

vpnc devel RSS feed   Index | Next | Previous | View Threaded


alon.barlev at gmail

Aug 14, 2012, 11:52 PM

Post #1 of 2 (562 views)
Permalink
[PATCH] support route metric

This adds optional ROUTE_METRIC environment variable to vpnc-script to
allow set non default routes and dns metrics.

Signed-off-by: Alon Bar-Lev <alon.barlev [at] gmail>
---
vpnc-script | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/vpnc-script b/vpnc-script
index 2058ab7..e07b879 100755
--- a/vpnc-script
+++ b/vpnc-script
@@ -234,7 +234,7 @@ if [ -n "$IPROUTE" ]; then
NETWORK="$1"
NETMASK="$2"
NETMASKLEN="$3"
- $IPROUTE route replace "$NETWORK/$NETMASKLEN" dev "$TUNDEV"
+ $IPROUTE route replace "$NETWORK/$NETMASKLEN" dev "$TUNDEV" ${ROUTE_METRIC:+metric ${ROUTE_METRIC}}
$IPROUTE route flush cache
}

@@ -549,7 +549,7 @@ nameserver $i"
NEW_RESOLVCONF="$NEW_RESOLVCONF
domain $CISCO_DEF_DOMAIN"
fi
- echo "$NEW_RESOLVCONF" | ${RESOLVCONF} -a $TUNDEV
+ echo "$NEW_RESOLVCONF" | ${RESOLVCONF} ${ROUTE_METRIC:+-m ${ROUTE_METRIC}} -a $TUNDEV
}

restore_resolvconf_manager() {
--
1.7.8.6

_______________________________________________
vpnc-devel mailing list
vpnc-devel [at] unix-ag
https://lists.unix-ag.uni-kl.de/mailman/listinfo/vpnc-devel
http://www.unix-ag.uni-kl.de/~massar/vpnc/


alon.barlev at gmail

Aug 14, 2012, 11:53 PM

Post #2 of 2 (518 views)
Permalink
Re: [PATCH] support route metric [In reply to]

On Wed, Aug 15, 2012 at 9:52 AM, Alon Bar-Lev <alon.barlev [at] gmail> wrote:
>
> This adds optional ROUTE_METRIC environment variable to vpnc-script to
> allow set non default routes and dns metrics.
>
> Signed-off-by: Alon Bar-Lev <alon.barlev [at] gmail>
> ---
> vpnc-script | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)

Also rebased to vpnc-scripts[1].

[1] https://github.com/alonbl/vpnc-scripts/compare/master...unprivileged
_______________________________________________
vpnc-devel mailing list
vpnc-devel [at] unix-ag
https://lists.unix-ag.uni-kl.de/mailman/listinfo/vpnc-devel
http://www.unix-ag.uni-kl.de/~massar/vpnc/

vpnc devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.