net/dhcp: Make grub_net_process_dhcp() take an interface

Change the interface of the function dealing with incoming BOOTP packets
to take an interface instead of a card, to allow more fine per-interface
state (timeout, handshake state) later on.

Use the opportunity to clean up the code a bit.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Andrei Borzenkov 2019-03-07 15:14:11 +00:00 committed by Vincent Batts
parent f8da4f6154
commit 4013ed17a3
3 changed files with 16 additions and 17 deletions

View file

@ -279,7 +279,7 @@ handle_dgram (struct grub_net_buff *nb,
&& grub_memcmp (inf->hwaddress.mac, &bootp->mac_addr,
sizeof (inf->hwaddress.mac)) == 0)
{
grub_net_process_dhcp (nb, inf->card);
grub_net_process_dhcp (nb, inf);
grub_netbuff_free (nb);
return GRUB_ERR_NONE;
}