david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

Now sends IP packets correctly.

This commit is contained in:
Michael Brown 2007-09-13 01:14:56 +01:00
parent c0d99245a9
commit 9e32e8e513
1 changed files with 4 additions and 11 deletions

View File

@ -187,23 +187,16 @@ static int mlx_transmit ( struct net_device *netdev,
struct io_buffer *iobuf ) {
struct ibhdr *ibhdr = iobuf->data;
DBG ( "Sending packet:\n" );
// DBG_HD ( iobuf->data, iob_len ( iobuf ) );
DBG ( "Peer:\n" );
DBG_HD ( &ibhdr->peer[0], IB_ALEN );
DBG ( "Bcast:\n" );
DBG_HD ( &ib_broadcast[0], IB_ALEN );
iob_pull ( iobuf, sizeof ( *ibhdr ) );
if ( memcmp ( ibhdr->peer, ib_broadcast, IB_ALEN ) == 0 ) {
printf ( "Sending broadcast packet\n" );
return send_bcast_packet ( ibhdr->proto, iobuf->data,
iob_len ( iobuf ) );
return send_bcast_packet ( ntohs ( ibhdr->proto ),
iobuf->data, iob_len ( iobuf ) );
} else {
printf ( "Sending unicast packet\n" );
return send_ucast_packet ( ibhdr->peer, ibhdr->proto,
return send_ucast_packet ( ibhdr->peer,
ntohs ( ibhdr->proto ),
iobuf->data, iob_len ( iobuf ) );
}
}