Преглед на файлове

DHCP transmits via specified net device, so no need to create a dummy

routing table entry just to fool ipv4.c any more.
tags/v0.9.3
Michael Brown преди 17 години
родител
ревизия
649b789e93
променени са 2 файла, в които са добавени 2 реда и са изтрити 10 реда
  1. 2
    2
      src/net/udp/dhcp.c
  2. 0
    8
      src/tests/dhcptest.c

+ 2
- 2
src/net/udp/dhcp.c Целия файл

@@ -582,8 +582,8 @@ static int dhcp_senddata ( struct udp_connection *conn,
582 582
 	}
583 583
 
584 584
 	/* Transmit the packet */
585
-	if ( ( rc = udp_sendto ( conn, &sa_dhcp_server.st,
586
-				 dhcppkt.dhcphdr, dhcppkt.len ) ) != 0 ) {
585
+	if ( ( rc = udp_sendto_via ( conn, &sa_dhcp_server.st, dhcp->netdev,
586
+				     dhcppkt.dhcphdr, dhcppkt.len ) ) != 0 ) {
587 587
 		DBG ( "Could not transmit UDP packet\n" );
588 588
 		return rc;
589 589
 	}

+ 0
- 8
src/tests/dhcptest.c Целия файл

@@ -218,11 +218,6 @@ int test_dhcp ( struct net_device *netdev ) {
218 218
 	char filename[256];
219 219
 	int rc;
220 220
 
221
-	/* Bring IP interface up with address 0.0.0.0 */
222
-	if ( ( rc = add_ipv4_address ( netdev, address, netmask,
223
-				       gateway ) ) != 0 )
224
-		goto out_no_del_ipv4;
225
-
226 221
 	/* Issue DHCP request */
227 222
 	printf ( "DHCP (%s)...", netdev->name );
228 223
 	memset ( &dhcp, 0, sizeof ( dhcp ) );
@@ -251,9 +246,6 @@ int test_dhcp ( struct net_device *netdev ) {
251 246
 	if ( filename[0] )
252 247
 		printf ( "Bootfile name \"%s\"\n", filename );
253 248
 
254
-	/* Remove old IP address configuration */
255
-	del_ipv4_address ( netdev );
256
-
257 249
 	/* Set up new IP address configuration */
258 250
 	if ( ( rc = add_ipv4_address ( netdev, address, netmask,
259 251
 				       gateway ) ) != 0 )

Loading…
Отказ
Запис