SOLVED
I finally figured out what is to be done. First, need to add a new macro in the list of option codes in common.h. I added it as '#define DHCP_OPTION_150 0x96'. Next, in dhcpc.c, a small code block needs to be added in udhcpc_main() and under the code block for DHCPACK, to extract the IP address:
temp = udhcp_get_option(&packet, DHCP_OPTION_150);
if (!temp) {
bb_error_msg("error: couldn't get opt 150");
} else {
uint32_t tftp_ip;
move_from_unaligned32(tftp_ip, temp);
tftp_ip = ntohl(tftp_ip);
}
|