From 03f0c23f8b1a60575f788dd1b9d4ea47debf2345 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 29 Aug 2012 23:34:14 +0100 Subject: [ipoib] Expose Ethernet-compatible eIPoIB link-layer addresses and headers Almost all clients of the raw-packet interfaces (UNDI and SNP) can handle only Ethernet link layers. Expose an Ethernet-compatible link layer to local clients, while remaining compatible with IPoIB on the wire. This requires manipulation of ARP (but not DHCP) packets within the IPoIB driver. This is ugly, but it's the only viable way to allow IPoIB devices to be driven via the raw-packet interfaces. Signed-off-by: Michael Brown --- src/usr/dhcpmgmt.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/usr') diff --git a/src/usr/dhcpmgmt.c b/src/usr/dhcpmgmt.c index 1bd9bff0a..b61c01aa3 100644 --- a/src/usr/dhcpmgmt.c +++ b/src/usr/dhcpmgmt.c @@ -38,10 +38,6 @@ FILE_LICENCE ( GPL2_OR_LATER ); */ int dhcp ( struct net_device *netdev ) { - struct dhcphdr *dhcphdr; - typeof ( dhcphdr->chaddr ) chaddr; - unsigned int hlen; - unsigned int i; int rc; /* Check we can open the interface first */ @@ -53,12 +49,8 @@ int dhcp ( struct net_device *netdev ) { return rc; /* Perform DHCP */ - printf ( "DHCP (%s", netdev->name ); - hlen = dhcp_chaddr ( netdev, chaddr, NULL ); - for ( i = 0 ; i < hlen ; i++ ) - printf ( "%c%02x", ( i ? ':' : ' ' ), chaddr[i] ); - printf ( ")" ); - + printf ( "DHCP (%s %s)", netdev->name, + netdev->ll_protocol->ntoa ( netdev->ll_addr ) ); if ( ( rc = start_dhcp ( &monojob, netdev ) ) == 0 ) { rc = monojob_wait ( "" ); } else if ( rc > 0 ) { -- cgit v1.2.3-55-g7522