Hi,<br><br>For the explanation about /etc/hosts being static and only need to restart the pluto for correct entry, refer to to below code.<br><br>#include <stdio.h><br>#include <netdb.h><br>#include <arpa/inet.h> <br>
#include <netinet/in.h><br>#include <unistd.h><br><br>int <br>main(int argc, char **argv) {<br> struct hostent *host; /* host information */<br> struct in_addr h_addr; /* internet address */<br>
if (argc != 2) {<br> fprintf(stderr, "USAGE: nslookup <inet_address>\n");<br> return 1;<br> }<br> while(1){<br> if ((host = gethostbyname(argv[1])) == NULL) {<br>
fprintf(stderr, "(mini) nslookup failed on '%s'\n", argv[1]);<br> return 1;<br> }<br> h_addr.s_addr = *((unsigned long *) host->h_addr_list[0]);<br>
fprintf(stdout, "%s\n", inet_ntoa(h_addr));<br> sleep(5);<br> }<br> return 0;<br>}<br><br>After successfully complying the code, I run it with /etc/hosts entry for 'ddnstest' as '10.103.6.70'. While the program is running, I change the entry for ddnstest to 10.103.6.71 and see that it is reflected in my running program.<br>
<br>root@netgenie:~# ./lookup ddnstest<br>10.103.6.70<br>10.103.6.70<br>10.103.6.71<br>...<br><br>The one who thinks that pluto needs to restart, for /etc/hosts as these are static entries needs to rethink about the problem.<br>
I am heavily on to the DPD and related feature's testing. I have found some SIGABORT and SIGSEGV for few configurations. Let us please resolve issues before really guessing the unwanted posts.<br><br>Regards,<br>Nrupen<br>
<br><div class="gmail_quote">On Thu, Mar 29, 2012 at 10:41 PM, Tuomo Soini <span dir="ltr"><<a href="mailto:tis@foobar.fi">tis@foobar.fi</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Wed, 28 Mar 2012 11:38:03 +0530<br>
Nrupen Chudasma <<a href="mailto:nrupen@gmail.com">nrupen@gmail.com</a>> wrote:<br>
<br>
> Hi,<br>
><br>
> Yesterday I sent the same comment in the User's list. But I think it<br>
> would be appropriate to discuss about the bug in dev list.<br>
><br>
> I have been using openswan 2.6.24 with NETKEY for quite a long time.<br>
> I had a requirement for DYNDNS based remote host support for making<br>
> the connections. As there is support added, I tried with the 2.6.24<br>
> version and could not succeed.<br>
> I searched out for bug#1201 with the exact reason. So I uprated to<br>
> version 2.6.33. But the problem is still there. Even I tried latest<br>
> version i.e. 2.6.38 but the result is same.<br>
><br>
> According to the RCA done for the bug, "conn->dnshostname" is NULL.<br>
> The specified solution was to work with ipsec whack.<br>
><br>
> I tried with that. Please correct me if my approach for the problem is<br>
> wrong. I have put remote as "ddnstest" and added entry in<br>
> the /etc/hosts file.<br>
> I add one connection with ipsec whack. Initiate the connection. Later<br>
> I change my remote host's IP and add the according entry<br>
> in /etc/hosts. The dpdtimeout happens as the former IP no longer<br>
> available and thus I get the DPD in which case my action restart<br>
> triggers the initiation of the connection.<br>
> Still my connection is initiated to the same IP as before.<br>
<br>
</div>Anything in /etc/hosts is static data - not dynamic dns - there is no<br>
guarantee it gets read without restarting whole pluto.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Tuomo Soini <<a href="mailto:tis@foobar.fi">tis@foobar.fi</a>><br>
Foobar Linux services<br>
+358 40 5240030<br>
Foobar Oy <<a href="http://foobar.fi/" target="_blank">http://foobar.fi/</a>><br>
_______________________________________________<br>
Dev mailing list<br>
<a href="mailto:Dev@lists.openswan.org">Dev@lists.openswan.org</a><br>
<a href="https://lists.openswan.org/mailman/listinfo/dev" target="_blank">https://lists.openswan.org/mailman/listinfo/dev</a><br>
</font></span></blockquote></div><br>