Changeset 836dd794 in mainline for uspace/srv/net/il/ip/ip.c
- Timestamp:
- 2010-03-07T20:17:17Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 31c80a5
- Parents:
- 936835e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/il/ip/ip.c
r936835e r836dd794 696 696 return ip_release_and_return(packet, EAFNOSUPPORT); 697 697 } 698 netif = NULL; 699 route = NULL; 698 700 fibril_rwlock_read_lock(&ip_globals.netifs_lock); 699 701 // device specified? … … 704 706 route = &ip_globals.gateway; 705 707 } 706 }else{ 708 } 709 if(! route){ 707 710 route = ip_find_route(*dest); 708 711 netif = route ? route->netif : NULL; … … 726 729 } 727 730 } 728 if(route->address.s_addr == dest->s_addr){ 731 // if the local host is the destination 732 if((route->address.s_addr == dest->s_addr) 733 && (dest->s_addr != IPV4_LOCALHOST_ADDRESS)){ 729 734 // find the loopback device to deliver 730 735 dest->s_addr = IPV4_LOCALHOST_ADDRESS; … … 1581 1586 fibril_rwlock_read_lock(&ip_globals.lock); 1582 1587 route = ip_find_route(*dest); 1588 // if the local host is the destination 1589 if(route && (route->address.s_addr == dest->s_addr) 1590 && (dest->s_addr != IPV4_LOCALHOST_ADDRESS)){ 1591 // find the loopback device to deliver 1592 dest->s_addr = IPV4_LOCALHOST_ADDRESS; 1593 route = ip_find_route(*dest); 1594 } 1583 1595 if(!(route && route->netif)){ 1584 1596 fibril_rwlock_read_unlock(&ip_globals.lock);
Note:
See TracChangeset
for help on using the changeset viewer.