With reference to: <a href="http://lists.openswan.org/pipermail/users/2009-January/016107.html">http://lists.openswan.org/pipermail/users/2009-January/016107.html</a><br><br>For openswan-2.4.x;<br>the following calls _updown with proper PLUTO_VERB<br>
and exports four additional parameters:<br>PLUTO_MY_PROTOCOL PLUTO_MY_PORT PLUTO_PEER_PROTOCOL PLUTO_PEER_PORT.<br><br>--- programs/manual/manual.in.orig Sun Jan 18 19:15:11 2009<br>+++ programs/manual/<a href="http://manual.in">manual.in</a> Sun Jan 18 19:14:54 2009<br>
@@ -322,10 +322,24 @@ awk ' BEGIN {<br> }<br> print "PLUTO_VERB=" verb verbsuf " " cmd " " suffix<br> }<br>+ #split proto/port<br>+ function splitprotoport(k) {<br>
+ if (k"protoport" in s) {<br>+ n = split (s[k"protoport"], str, "/")<br>+ s[k"proto"] = str[1]<br>+ s[k"port"] = (n > 1) ? (str[2] == "%any" ? 0 : str[2]) : 0<br>
+ }<br>+ else {<br>+ set_os_default(k"proto","0")<br>+ set_os_default(k"port","0")<br>+ }<br>+ }<br> END {<br> #########<br> if (failed)<br>
exit 1<br>+ splitprotoport("left")<br>+ splitprotoport("right")<br> set_os_default("type", "tunnel")<br> type = s["type"]<br> shunt = 0<br>@@ -425,7 +439,7 @@ awk ' BEGIN {<br>
else if (s["right"] == me)<br> me = s["left"]<br> }<br>- havesubnet = leftsubnet<br>+ havesubnet = s["leftsubnet"]<br> if (s["right"] == me) {<br>
swap("") # swaps "left" and "right"<br> swap("subnet")<br>@@ -442,7 +456,7 @@ awk ' BEGIN {<br> t = spil<br> spil = spir<br> spir = t<br>
- havesubnet = rightsubnet<br>+ havesubnet = s["rightsubnet"]<br> }<br> him = s["right"]<br> <br>@@ -495,11 +509,16 @@ awk ' BEGIN {<br> print "PLUTO_PEER_CLIENT=" s["rightsubnet"]<br>
print "PLUTO_PEER_CLIENT_NET=" s["rightnet"]<br> print "PLUTO_PEER_CLIENT_MASK=" s["rightmask"]<br>+ print "PLUTO_MY_PROTOCOL=" s["leftproto"]<br>+ print "PLUTO_MY_PORT=" s["leftport"]<br>
+ print "PLUTO_PEER_PROTOCOL=" s["rightproto"]<br>+ print "PLUTO_PEER_PORT=" s["rightport"]<br> print "export PLUTO_VERSION PLUTO_CONNECTION PLUTO_NEXT_HOP"<br> print "export PLUTO_INTERFACE PLUTO_ME PLUTO_MY_CLIENT"<br>
print "export PLUTO_MY_CLIENT_NET PLUTO_MY_CLIENT_MASK PLUTO_PEER"<br> print "export PLUTO_PEER_CLIENT PLUTO_PEER_CLIENT_NET"<br> print "export PLUTO_PEER_CLIENT_MASK"<br>+ print "export PLUTO_MY_PROTOCOL PLUTO_MY_PORT PLUTO_PEER_PROTOCOL PLUTO_PEER_PORT"<br>
<br> if (op == "--up") {<br> print "{"<br><br><div class="gmail_quote">Regards,<br>hiren<br><br>On Thu, Jan 29, 2009 at 8:38 PM, hiren joshi <span dir="ltr"><<a href="mailto:joshihirenn@gmail.com">joshihirenn@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello,<br><br>When I manually make the following connection up (ipsec manual --up manual_keying),<br>
_updown script is being called with PLUTO_VERB="up-host" instead of PLUTO_VERB="up-client".<br><br>config setup<br>
interfaces="ipsec0=eth1 "<br>
klipsdebug=none<br>
plutodebug="none"<br>
uniqueids=no<br>
nat_traversal=yes<br>
crlcheckinterval=3600<br>
nhelpers=0<br>
<br>
conn %default<br>
leftupdown=/usr/lib/ipsec/_updown<br>
rightupdown=/usr/lib/ipsec/_updown<br>
<br>
conn manual_keying<br>
leftsubnet=<a href="http://192.168.3.0/24" target="_blank">192.168.3.0/24</a><br>
rightsubnet=<a href="http://192.168.2.0/24" target="_blank">192.168.2.0/24</a><br>
type=tunnel<br>
left=172.16.3.2<br>
leftnexthop=172.16.3.1<br>
right=172.16.1.11<br>
spi=0x100<br>
leftespspi=0x1111<br>
rightespspi=0x2222<br>
esp=des<br>
leftespenckey=0x0123456789012345<br>
rightespenckey=0x9876543210987654<br><br>Any clue?<br><br>Thanks for your time.<br><br>Regards,<br><font color="#888888">hiren<br>
</font></blockquote></div><br>