[OLSR-users] Strange code in parse_packet

Joerg Pommnitz (spam-protected)
Mon Jul 31 14:14:46 CEST 2006


Hi all,
this looks strange:

  /*
   * Hysteresis update - for every OLSR package
   */
  if(olsr_cnf->use_hysteresis)
    {
      if(olsr_cnf->ip_version == AF_INET)
	{
	  /* IPv4 */
	  update_hysteresis_incoming(from_addr, 
				     &in_if->ip_addr,
				     ntohs(olsr->olsr_seqno));
	}
      else
	{
	  /* IPv6 */
	  update_hysteresis_incoming(from_addr, 
				     &in_if->ip_addr, 
				     ntohs(olsr->olsr_seqno));
	}
    }

Either I'm missing something or olsrd calls the same code with the same
arguments for two different cases. My suspiction is, that this is a
leftover from a time when IPv6 was introduced, but it could be that there
really should be two cases and something is amiss.

Regards
  Joerg


	

	
		
___________________________________________________________ 
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de




More information about the Olsr-users mailing list