|
@@ -236,6 +236,7 @@ static int ibft_fill_nic ( struct ibft_nic *nic,
|
236
|
236
|
struct in_addr netmask_addr = { 0 };
|
237
|
237
|
unsigned int netmask_count = 0;
|
238
|
238
|
struct settings *parent = netdev_settings ( netdev );
|
|
239
|
+ struct settings *origin;
|
239
|
240
|
int rc;
|
240
|
241
|
|
241
|
242
|
/* Fill in common header */
|
|
@@ -245,6 +246,12 @@ static int ibft_fill_nic ( struct ibft_nic *nic,
|
245
|
246
|
nic->header.flags = ( IBFT_FL_NIC_BLOCK_VALID |
|
246
|
247
|
IBFT_FL_NIC_FIRMWARE_BOOT_SELECTED );
|
247
|
248
|
|
|
249
|
+ /* Determine origin of IP address */
|
|
250
|
+ fetch_setting ( parent, &ip_setting, &origin, NULL, NULL, 0 );
|
|
251
|
+ nic->origin = ( ( origin == parent ) ?
|
|
252
|
+ IBFT_NIC_ORIGIN_MANUAL : IBFT_NIC_ORIGIN_DHCP );
|
|
253
|
+ DBG ( "iBFT NIC origin = %d\n", nic->origin );
|
|
254
|
+
|
248
|
255
|
/* Extract values from configuration settings */
|
249
|
256
|
ibft_set_ipaddr_setting ( parent, &nic->ip_address, &ip_setting, 1 );
|
250
|
257
|
DBG ( "iBFT NIC IP = %s\n", ibft_ipaddr ( &nic->ip_address ) );
|