[ipxe-devel] [ipxe/ipxe] [dhcp/ipv4] Support for DHCP option 121: Classless static route option (#67)
multun
notifications at github.com
Mon Apr 30 23:40:46 UTC 2018
multun commented on this pull request.
> @@ -890,9 +921,51 @@ static int ipv4_settings ( int ( * apply ) ( struct net_device *netdev,
/* Get default gateway, if present */
fetch_ipv4_setting ( settings, &gateway_setting, &gateway );
- /* Apply settings */
- if ( ( rc = apply ( netdev, address, netmask, gateway ) ) != 0 )
- return rc;
+ /* Configure route (-s) */
+ uint8_t * raw_data = netdev->static_routes;
+ uint8_t option_len = netdev->static_routes_len;
+
+ /* Check if static routes available
+ * The minimum length for DHCP option 121 is 5 bytes */
+ if ( option_len >= 5 ) {
+ char buf[16];
+ uint8_t uaddr[4];
+ uint8_t i = 0, j, addr_octets_len;
declaring multiple variables on a single lines usually is bad style.
the only places you may find it in ipxe is within code ported from linux.
j also is reused multiple times eventhough it could be a different variable every single time.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/ipxe/ipxe/pull/67#pullrequestreview-116472012
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20180430/ba10833a/attachment.htm>
More information about the ipxe-devel
mailing list