[Olsr-cvs] olsrd-current/src interfaces.c, 1.31, 1.32 interfaces.h, 1.39, 1.40 net_olsr.c, 1.22, 1.23 olsr_cfg.h, 1.30, 1.31 process_routes.c, 1.32, 1.33

Bernd Petrovitsch (spam-protected)
Mon May 14 00:23:57 CEST 2007


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

Modified Files:
	interfaces.c interfaces.h net_olsr.c olsr_cfg.h 
	process_routes.c 
Log Message:
* killed if_nr in struct interface and index in struct olsr_if.
  Kudos to Jörg Pommnitz <(spam-protected)> for spotting this
  leftovers and a patch for the Unix part.


Index: olsr_cfg.h
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/olsr_cfg.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** olsr_cfg.h	17 Apr 2006 18:31:09 -0000	1.30
--- olsr_cfg.h	13 May 2007 22:23:55 -0000	1.31
***************
*** 133,137 ****
    char                     *name;
    char                     *config;
-   int                      index;
    olsr_bool                configured;
    olsr_bool                host_emul;
--- 133,136 ----
***************
*** 224,228 ****
    struct ipc_net           *ipc_nets;
    struct olsr_if           *interfaces;
-   olsr_u16_t               ifcnt;
  
    /* Stuff set by olsrd */
--- 223,226 ----

Index: interfaces.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/interfaces.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** interfaces.c	25 Apr 2007 22:08:08 -0000	1.31
--- interfaces.c	13 May 2007 22:23:55 -0000	1.32
***************
*** 343,347 ****
    interf_n->interf = NULL;
    interf_n->configured = 0;
-   interf_n->index = olsr_cnf->ifcnt++;
  
    interf_n->host_emul = hemu ? OLSR_TRUE : OLSR_FALSE;
--- 343,346 ----

Index: process_routes.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/process_routes.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** process_routes.c	25 Apr 2007 22:08:13 -0000	1.32
--- process_routes.c	13 May 2007 22:23:55 -0000	1.33
***************
*** 248,252 ****
        if (COMP_IP(&destination->rt_dst, &dst->rt_dst) &&
  	  COMP_IP(&destination->rt_router, &dst->rt_router) &&
! 	  (destination->rt_if->if_nr == dst->rt_if->if_nr))
  	{
  	  if(destination->rt_metric == dst->rt_metric)
--- 248,252 ----
        if (COMP_IP(&destination->rt_dst, &dst->rt_dst) &&
  	  COMP_IP(&destination->rt_router, &dst->rt_router) &&
! 	  (destination->rt_if->if_index == dst->rt_if->if_index))
  	{
  	  if(destination->rt_metric == dst->rt_metric)

Index: interfaces.h
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/interfaces.h,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** interfaces.h	20 Apr 2007 13:46:04 -0000	1.39
--- interfaces.h	13 May 2007 22:23:55 -0000	1.40
***************
*** 142,146 ****
    char	        *int_name;			/* from kernel if structure */
    int           if_index;                       /* Kernels index of this interface */
-   int           if_nr;                          /* This interfaces index internally*/
    int           is_wireless;                    /* wireless interface or not*/
    olsr_u16_t    olsr_seqnum;                    /* Olsr message seqno */
--- 142,145 ----

Index: net_olsr.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/net_olsr.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** net_olsr.c	25 Apr 2007 22:08:09 -0000	1.22
--- net_olsr.c	13 May 2007 22:23:55 -0000	1.23
***************
*** 459,463 ****
  	  perror("sendto(v6)");
  	  olsr_syslog(OLSR_LOG_ERR, "OLSR: sendto IPv6 %m");
! 	  fprintf(stderr, "Socket: %d interface: %d\n", ifp->olsr_socket, ifp->if_nr);
  	  fprintf(stderr, "To: %s (size: %d)\n", ip6_to_string(&sin6->sin6_addr), (int)sizeof(*sin6));
  	  fprintf(stderr, "Outputsize: %d\n", ifp->netbuf.pending);
--- 459,463 ----
  	  perror("sendto(v6)");
  	  olsr_syslog(OLSR_LOG_ERR, "OLSR: sendto IPv6 %m");
! 	  fprintf(stderr, "Socket: %d interface: %d\n", ifp->olsr_socket, ifp->if_index);
  	  fprintf(stderr, "To: %s (size: %d)\n", ip6_to_string(&sin6->sin6_addr), (int)sizeof(*sin6));
  	  fprintf(stderr, "Outputsize: %d\n", ifp->netbuf.pending);





More information about the Olsr-cvs mailing list