DHCP transmits via specified net device, so no need to create a dummy
routing table entry just to fool ipv4.c any more.
This commit is contained in:
parent
c821a7b20d
commit
649b789e93
@ -582,8 +582,8 @@ static int dhcp_senddata ( struct udp_connection *conn,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Transmit the packet */
|
/* Transmit the packet */
|
||||||
if ( ( rc = udp_sendto ( conn, &sa_dhcp_server.st,
|
if ( ( rc = udp_sendto_via ( conn, &sa_dhcp_server.st, dhcp->netdev,
|
||||||
dhcppkt.dhcphdr, dhcppkt.len ) ) != 0 ) {
|
dhcppkt.dhcphdr, dhcppkt.len ) ) != 0 ) {
|
||||||
DBG ( "Could not transmit UDP packet\n" );
|
DBG ( "Could not transmit UDP packet\n" );
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
@ -218,11 +218,6 @@ int test_dhcp ( struct net_device *netdev ) {
|
|||||||
char filename[256];
|
char filename[256];
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
/* Bring IP interface up with address 0.0.0.0 */
|
|
||||||
if ( ( rc = add_ipv4_address ( netdev, address, netmask,
|
|
||||||
gateway ) ) != 0 )
|
|
||||||
goto out_no_del_ipv4;
|
|
||||||
|
|
||||||
/* Issue DHCP request */
|
/* Issue DHCP request */
|
||||||
printf ( "DHCP (%s)...", netdev->name );
|
printf ( "DHCP (%s)...", netdev->name );
|
||||||
memset ( &dhcp, 0, sizeof ( dhcp ) );
|
memset ( &dhcp, 0, sizeof ( dhcp ) );
|
||||||
@ -251,9 +246,6 @@ int test_dhcp ( struct net_device *netdev ) {
|
|||||||
if ( filename[0] )
|
if ( filename[0] )
|
||||||
printf ( "Bootfile name \"%s\"\n", filename );
|
printf ( "Bootfile name \"%s\"\n", filename );
|
||||||
|
|
||||||
/* Remove old IP address configuration */
|
|
||||||
del_ipv4_address ( netdev );
|
|
||||||
|
|
||||||
/* Set up new IP address configuration */
|
/* Set up new IP address configuration */
|
||||||
if ( ( rc = add_ipv4_address ( netdev, address, netmask,
|
if ( ( rc = add_ipv4_address ( netdev, address, netmask,
|
||||||
gateway ) ) != 0 )
|
gateway ) ) != 0 )
|
||||||
|
Reference in New Issue
Block a user