[Olsr-cvs] olsrd-current/src net_olsr.c, 1.3, 1.4 lq_packet.c, 1.16, 1.17

Andreas T�nnesen (spam-protected)
Sat Oct 8 17:43:58 CEST 2005


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

Modified Files:
	net_olsr.c lq_packet.c 
Log Message:
Patch from Sven-Ola

Index: lq_packet.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/lq_packet.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** lq_packet.c	25 May 2005 13:36:41 -0000	1.16
--- lq_packet.c	8 Oct 2005 15:43:56 -0000	1.17
***************
*** 774,777 ****
--- 774,783 ----
    struct hello_neighbor *new_neigh;
  
+   // SVEN_OLA: Check the message source addr
+   if(!olsr_validate_address(&lq_hello->comm.orig))
+     {
+       return;
+     }
+ 
    // XXX - translation is ugly; everybody should use lq_hello_message :-)
  
***************
*** 794,797 ****
--- 800,806 ----
    for (neigh = lq_hello->neigh; neigh != NULL; neigh = neigh->next)
      {
+       // SVEN_OLA: Also check the neighbours
+       if(!olsr_validate_address(&neigh->addr)) continue;
+       
        // allocate HELLO neighbour
  
***************
*** 825,828 ****
--- 834,843 ----
    struct tc_mpr_addr *new_neigh;
  
+   // SVEN_OLA: Check the message source addr
+   if(!olsr_validate_address(&lq_tc->from)||!olsr_validate_address(&lq_tc->comm.orig))
+     {
+       return;
+     }
+ 
    // XXX - translation is ugly; everybody should use lq_tc_message :-)
  
***************
*** 845,848 ****
--- 860,866 ----
    for (neigh = lq_tc->neigh; neigh != NULL; neigh = neigh->next)
      {
+       // SVEN_OLA: Also check the neighbours
+       if(!olsr_validate_address(&neigh->main)) continue;
+       
        // allocate TC neighbour
  

Index: net_olsr.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/net_olsr.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** net_olsr.c	30 May 2005 13:13:38 -0000	1.3
--- net_olsr.c	8 Oct 2005 15:43:56 -0000	1.4
***************
*** 73,76 ****
--- 73,78 ----
    {
      "0.0.0.0",
+     //SVEN_OLA: This address is not plausible too
+     "127.0.0.1",
      NULL
    };





More information about the Olsr-cvs mailing list