[Openswan dev] Openswan 2.3.0 multiple defaultroute patch

Dirk Nehring dnehring at marcant.net
Tue Feb 1 23:03:47 CET 2005


Hi Openswan developer,

unfortunately, Openswan does not support multiple defaultroutes. Since
2.6 it is not a principle problem to route ESP packets via more than one
defaultroute. Here is my first patch for inclusion, if you like it,
please apply.

--------------------------------------------------
diff -ur openswan-2.2.0.orig/programs/_startklips/_startklips.in openswan-2.2.0/programs/_startklips/_startklips.in
--- openswan-2.2.0.orig/programs/_startklips/_startklips.in     2004-07-15 04:34:42.000000000 +0200
+++ openswan-2.2.0/programs/_startklips/_startklips.in  2004-11-26 13:21:37.142594304 +0100
@@ -192,7 +192,7 @@
 # interfaces=%defaultroute:  put ipsec0 on top of default route's interface
 defaultinterface() {
        phys=`netstat -nr |
-               awk '$1 == "0.0.0.0" && $3 == "0.0.0.0" { print $NF }'`
+               awk '$1 == "0.0.0.0" && $3 == "0.0.0.0" { print $NF }' | head -1`
        if test " $phys" = " "
        then
                echo "no default route, %defaultroute cannot cope!!!"
--------------------------------------------------

Regards,

Dirk Nehring


More information about the Dev mailing list