[Olsr-cvs] olsrd-current/src net_olsr.c,1.19,1.20 main.c,1.92,1.93

Bernd Petrovitsch (spam-protected)
Fri Apr 20 12:38:06 CEST 2007


Update of /cvsroot/olsrd/olsrd-current/src
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20421/src

Modified Files:
	net_olsr.c main.c 
Log Message:
* if inet_pton() fails it returns <= 0

Index: main.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/main.c,v
retrieving revision 1.92
retrieving revision 1.93
diff -C2 -d -r1.92 -r1.93
*** main.c	24 Feb 2007 11:54:24 -0000	1.92
--- main.c	20 Apr 2007 10:38:01 -0000	1.93
***************
*** 790,794 ****
  	  NEXT_ARG;
            CHECK_ARGC;
! 	  if(inet_pton(AF_INET6, *argv, &in6) < 0)
  	    {
  	      fprintf(stderr, "Failed converting IP address %s\n", *argv);
--- 790,794 ----
  	  NEXT_ARG;
            CHECK_ARGC;
! 	  if(inet_pton(AF_INET6, *argv, &in6) <= 0)
  	    {
  	      fprintf(stderr, "Failed converting IP address %s\n", *argv);
***************
*** 811,815 ****
  	  NEXT_ARG;
            CHECK_ARGC;
! 	  if(inet_pton(AF_INET, *argv, &in) < 0)
  	    {
  	      fprintf(stderr, "Failed converting IP address %s\n", *argv);
--- 811,815 ----
  	  NEXT_ARG;
            CHECK_ARGC;
! 	  if(inet_pton(AF_INET, *argv, &in) <= 0)
  	    {
  	      fprintf(stderr, "Failed converting IP address %s\n", *argv);

Index: net_olsr.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/net_olsr.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** net_olsr.c	10 Feb 2007 19:59:51 -0000	1.19
--- net_olsr.c	20 Apr 2007 10:38:01 -0000	1.20
***************
*** 114,118 ****
        for(i = 0; deny_ipv4_defaults[i] != NULL; i++)
  	{
! 	  if(inet_pton(olsr_cnf->ip_version, deny_ipv4_defaults[i], &addr) < 0)
  	    {
  	      fprintf(stderr, "Error converting fixed IP %s for deny rule!!\n",
--- 114,118 ----
        for(i = 0; deny_ipv4_defaults[i] != NULL; i++)
  	{
! 	  if(inet_pton(olsr_cnf->ip_version, deny_ipv4_defaults[i], &addr) <= 0)
  	    {
  	      fprintf(stderr, "Error converting fixed IP %s for deny rule!!\n",
***************
*** 128,132 ****
        for(i = 0; deny_ipv6_defaults[i] != NULL; i++)
  	{
! 	  if(inet_pton(olsr_cnf->ip_version, deny_ipv6_defaults[i], &addr) < 0)
  	    {
  	      fprintf(stderr, "Error converting fixed IP %s for deny rule!!\n",
--- 128,132 ----
        for(i = 0; deny_ipv6_defaults[i] != NULL; i++)
  	{
! 	  if(inet_pton(olsr_cnf->ip_version, deny_ipv6_defaults[i], &addr) <= 0)
  	    {
  	      fprintf(stderr, "Error converting fixed IP %s for deny rule!!\n",





More information about the Olsr-cvs mailing list