From f11da20f25ce4535f2731e403071b03f7118d40f Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Tue, 16 Jan 2007 04:09:13 +0000 Subject: When a network device is specified to tcpip_tx() or it's children, treat it as a fallback network device rather than an explicitly forced network device. Clear routing table entries before re-attempting DHCP. --- src/net/ipv4.c | 4 ++-- src/net/tcpip.c | 2 +- src/net/udp.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/net') diff --git a/src/net/ipv4.c b/src/net/ipv4.c index 1b93cf4ac..8a1e8df3e 100644 --- a/src/net/ipv4.c +++ b/src/net/ipv4.c @@ -350,7 +350,7 @@ static int ipv4_ll_addr ( struct in_addr dest, struct in_addr src, * @v pkb Packet buffer * @v tcpip Transport-layer protocol * @v st_dest Destination network-layer address - * @v netdev Network device (or NULL to route automatically) + * @v netdev Network device to use if no route found, or NULL * @v trans_csum Transport-layer checksum to complete, or NULL * @ret rc Status * @@ -394,7 +394,7 @@ static int ipv4_tx ( struct pk_buff *pkb, if ( ( rc = ipv4_ll_addr ( next_hop, iphdr->src, netdev, ll_dest ) ) != 0 ) { DBG ( "IPv4 has no link-layer address for %s: %s\n", - inet_ntoa ( iphdr->dest ), strerror ( rc ) ); + inet_ntoa ( next_hop ), strerror ( rc ) ); goto err; } diff --git a/src/net/tcpip.c b/src/net/tcpip.c index 00f81cd98..26565a5b6 100644 --- a/src/net/tcpip.c +++ b/src/net/tcpip.c @@ -65,7 +65,7 @@ int tcpip_rx ( struct pk_buff *pkb, uint8_t tcpip_proto, * @v pkb Packet buffer * @v tcpip_protocol Transport-layer protocol * @v st_dest Destination address - * @v netdev Network device (or NULL to route automatically) + * @v netdev Network device to use if no route found, or NULL * @v trans_csum Transport-layer checksum to complete, or NULL * @ret rc Return status code */ diff --git a/src/net/udp.c b/src/net/udp.c index 7966de098..34acc53f8 100644 --- a/src/net/udp.c +++ b/src/net/udp.c @@ -143,7 +143,7 @@ int udp_senddata ( struct udp_connection *conn ) { * * @v conn UDP connection * @v peer Destination address - * @v netdev Net device via which to send (or NULL) + * @v netdev Network device to use if no route found, or NULL * @v data Data to send * @v len Length of data * @ret rc Return status code -- cgit v1.2.3-55-g7522