[Openswan dev] BUG 1201: dpd + ddns does not work

Nrupen Chudasma nrupen at gmail.com
Fri Mar 30 08:05:07 EDT 2012


Hi,

For the explanation about /etc/hosts being static and only need to restart
the pluto for correct entry, refer to to below code.

#include <stdio.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <unistd.h>

int
main(int argc, char **argv) {
        struct hostent *host;     /* host information */
        struct in_addr h_addr;    /* internet address */
        if (argc != 2) {
                fprintf(stderr, "USAGE: nslookup <inet_address>\n");
                return 1;
        }
        while(1){
                if ((host = gethostbyname(argv[1])) == NULL) {
                        fprintf(stderr, "(mini) nslookup failed on '%s'\n",
argv[1]);
                        return 1;
                }
                h_addr.s_addr = *((unsigned long *) host->h_addr_list[0]);
                fprintf(stdout, "%s\n", inet_ntoa(h_addr));
                sleep(5);
        }
        return 0;
}

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.

root at netgenie:~# ./lookup ddnstest
10.103.6.70
10.103.6.70
10.103.6.71
...

The one who thinks that pluto needs to restart, for /etc/hosts as these are
static entries needs to rethink about the problem.
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.

Regards,
Nrupen

On Thu, Mar 29, 2012 at 10:41 PM, Tuomo Soini <tis at foobar.fi> wrote:

> On Wed, 28 Mar 2012 11:38:03 +0530
> Nrupen Chudasma <nrupen at gmail.com> wrote:
>
> > Hi,
> >
> > Yesterday I sent the same comment in the User's list. But I think it
> > would be appropriate to discuss about the bug in dev list.
> >
> > I have been using openswan 2.6.24 with NETKEY for quite a long time.
> > I had a requirement for DYNDNS based remote host support for making
> > the connections. As there is support added, I tried with the 2.6.24
> > version and could not succeed.
> > I searched out for bug#1201 with the exact reason. So I uprated to
> > version 2.6.33. But the problem is still there. Even I tried latest
> > version i.e. 2.6.38 but the result is same.
> >
> > According to the RCA done for the bug, "conn->dnshostname" is NULL.
> > The specified solution was to work with ipsec whack.
> >
> > I tried with that. Please correct me if my approach for the problem is
> > wrong. I have put remote as "ddnstest" and added entry in
> > the /etc/hosts file.
> > I add one connection with ipsec whack. Initiate the connection. Later
> > I change my remote host's IP and add the according entry
> > in /etc/hosts. The dpdtimeout happens as the former IP no longer
> > available and thus I get the DPD in which case my action restart
> > triggers the initiation of the connection.
> > Still my connection is initiated to the same IP as before.
>
> Anything in /etc/hosts is static data - not dynamic dns - there is no
> guarantee it gets read without restarting whole pluto.
>
> --
> Tuomo Soini <tis at foobar.fi>
> Foobar Linux services
> +358 40 5240030
> Foobar Oy <http://foobar.fi/>
> _______________________________________________
> Dev mailing list
> Dev at lists.openswan.org
> https://lists.openswan.org/mailman/listinfo/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.openswan.org/pipermail/dev/attachments/20120330/8ddedcbf/attachment.html>


More information about the Dev mailing list