[Olsr-cvs] olsrd-current/src/unix ifnet.c,1.35,1.36
Andreas T�nnesen
(spam-protected)
Tue Apr 11 16:59:22 CEST 2006
Update of /cvsroot/olsrd/olsrd-current/src/unix
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1971/src/unix
Modified Files:
ifnet.c
Log Message:
Fix for bug where main address is not updated when IP change is detected
Index: ifnet.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/unix/ifnet.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** ifnet.c 10 Jan 2006 20:38:19 -0000 1.35
--- ifnet.c 11 Apr 2006 14:59:20 -0000 1.36
***************
*** 316,320 ****
if(memcmp(&olsr_cnf->main_addr,
! &((struct sockaddr_in *)&ifp->int_addr)->sin_addr.s_addr,
olsr_cnf->ipsize) == 0)
{
--- 316,320 ----
if(memcmp(&olsr_cnf->main_addr,
! &((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr.s_addr,
olsr_cnf->ipsize) == 0)
{
***************
*** 322,326 ****
olsr_syslog(OLSR_LOG_INFO, "New main address: %s\n", sockaddr_to_string(&ifr.ifr_addr));
memcpy(&olsr_cnf->main_addr,
! &((struct sockaddr_in *)&ifp->int_addr)->sin_addr.s_addr,
olsr_cnf->ipsize);
}
--- 322,326 ----
olsr_syslog(OLSR_LOG_INFO, "New main address: %s\n", sockaddr_to_string(&ifr.ifr_addr));
memcpy(&olsr_cnf->main_addr,
! &((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr.s_addr,
olsr_cnf->ipsize);
}
***************
*** 328,332 ****
ifp->int_addr = ifr.ifr_addr;
memcpy(&ifp->ip_addr,
! &((struct sockaddr_in *)&ifp->int_addr)->sin_addr.s_addr,
olsr_cnf->ipsize);
--- 328,332 ----
ifp->int_addr = ifr.ifr_addr;
memcpy(&ifp->ip_addr,
! &((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr.s_addr,
olsr_cnf->ipsize);
More information about the Olsr-cvs
mailing list