the option set the last bit as well to ensure servername and bootfile are
only checked once as their check unsets bits 1 and 2.
Thanks to Tobias Stoeckmann.
goto exit;
break;
case DHO_OPTIONSOVERLOADED:
- /* Ensure we only get this option once */
+ /* Ensure we only get this option once by setting
+ * the last bit as well as the value.
+ * This is valid because only the first two bits
+ * actually mean anything in RFC2132 Section 9.3 */
if (!overl)
- overl = p[1];
+ overl = 0x80 | p[1];
break;
}
l = *p++;