294,6 → 294,7 |
measured_string_ref configuration; |
size_t count = sizeof( names ) / sizeof( measured_string_t ); |
char * data; |
measured_string_t address; |
int index; |
ip_route_ref route; |
in_addr_t gateway; |
357,17 → 358,18 |
ip_netif->routing = configuration[ 9 ].value && ( configuration[ 9 ].value[ 0 ] == 'y' ); |
net_free_settings( configuration, data ); |
} |
// binds the netif service which also initializes the device |
ip_netif->phone = bind_service( ip_netif->service, ( ipcarg_t ) ip_netif->device_id, SERVICE_IP, 0, ip_globals.client_connection ); |
if( ip_netif->phone < 0 ){ |
printf( "Failed to contact the nil service %d\n", ip_netif->service ); |
return ip_netif->phone; |
} |
// MUST BE AFTER the bind_service up there! |
// has to be after the device netif module initialization |
if( ip_netif->arp ){ |
if( route ){ |
configuration[ 0 ].value = ( char * ) & route->address.s_addr; |
configuration[ 0 ].length = CONVERT_SIZE( in_addr_t, char, 1 ); |
ERROR_PROPAGATE( arp_device_req( ip_netif->arp->phone, ip_netif->device_id, SERVICE_IP, ip_netif->service, & configuration[ 0 ] )); |
address.value = ( char * ) & route->address.s_addr; |
address.length = CONVERT_SIZE( in_addr_t, char, 1 ); |
ERROR_PROPAGATE( arp_device_req( ip_netif->arp->phone, ip_netif->device_id, SERVICE_IP, ip_netif->service, & address )); |
}else{ |
ip_netif->arp = 0; |
} |