[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:28:56 UTC 2018
multun commented on this pull request.
> + sprintf(buf, "255.255.%d.0", n_octet);
+ addr_len = 3;
+ } else if (cidr > 8) {
+ sprintf(buf, "255.%d.0.0", n_octet);
+ addr_len = 2;
+ } else if (cidr > 0) {
+ sprintf(buf, "%d.0.0.0", n_octet);
+ addr_len = 1;
+ } else if (cidr == 0) {
+ sprintf(buf, "0.0.0.0");
+ addr_len = 0;
+ } else {
+ DBGC(cidr, "Unknown netmask descriptor /%d.\n", cidr);
+ }
+
+ return addr_len;
why don't you return `cidr / 8` ?
--
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-116469984
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20180430/d198b628/attachment.htm>
More information about the ipxe-devel
mailing list