[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 3/9] net: dhcp: refactor DHCP packet transmission into sep
From: |
Daniel Kiper |
Subject: |
Re: [PATCH v2 3/9] net: dhcp: refactor DHCP packet transmission into separate function |
Date: |
Thu, 21 Feb 2019 19:12:42 +0100 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Tue, Feb 12, 2019 at 05:46:54PM +0000, Andre Przywara wrote:
> From: Andrei Borzenkov <address@hidden>
>
> In contrast to BOOTP, DHCP uses a 4-way handshake, so requires to send
> packets more often.
>
> Refactor the generation and sending of the BOOTREQUEST packet into a
> separate function, so that future code can more easily reuse this.
>
> Signed-off-by: Andre Przywara <address@hidden>
Reviewed-by: Daniel Kiper <address@hidden>
But one nitpick below...
> - err = grub_net_send_ip_packet (&ifaces[j], &target, &ll_target, nb,
> - GRUB_NET_IP_UDP);
> - grub_netbuff_free (nb);
> - if (err)
> - return err;
> + need_poll = 1;
> }
> - if (!done)
> + if (!need_poll)
> break;
> grub_net_poll_cards (interval, 0);
> }
>
> err = GRUB_ERR_NONE;
> +
This is not needed.
Daniel
- [PATCH v2 0/9] net: bootp: add native DHCPv4 support, Andre Przywara, 2019/02/12
- [PATCH v2 1/9] net: dhcp: remove dead code, Andre Przywara, 2019/02/12
- [PATCH v2 2/9] net: dhcp: replace parse_dhcp_vendor() with find_dhcp_option(), Andre Przywara, 2019/02/12
- [PATCH v2 3/9] net: dhcp: refactor DHCP packet transmission into separate function, Andre Przywara, 2019/02/12
- Re: [PATCH v2 3/9] net: dhcp: refactor DHCP packet transmission into separate function,
Daniel Kiper <=
- [PATCH v2 4/9] net: dhcp: make grub_net_process_dhcp take an interface, Andre Przywara, 2019/02/12
- [PATCH v2 5/9] net: dhcp: introduce per-interface timeout, Andre Przywara, 2019/02/12
- [PATCH v2 6/9] net: dhcp: use DHCP options for name and bootfile, Andre Przywara, 2019/02/12
- [PATCH v2 8/9] net: dhcp: actually send out DHCPv4 DISCOVER and REQUEST messages, Andre Przywara, 2019/02/12
- [PATCH v2 7/9] net: dhcp: allow receiving DHCP OFFER and ACK packets, Andre Przywara, 2019/02/12