DHCP request fields insufficiency fixed

This commit is contained in:
Wiesner András 2023-02-24 15:45:43 +01:00
parent 99e7d26e67
commit 048aa6f1db
2 changed files with 5 additions and 1 deletions

View File

@ -36,7 +36,7 @@ EthInterface *ethintf_new(EthIODef * io) {
ethIntf->txQ = mq_create(ETHLIB_DEF_MQ_SIZE);
ethIntf->rxQ = mq_create(ETHLIB_DEF_MQ_SIZE);
ETHLIB_OS_SEM_CREATE(&ethIntf->rxSem);
ETHLIB_OS_THREAD_DEFINE(ethinf_proc_thread, ipp, 10, 4096, ethIntf);
ETHLIB_OS_THREAD_DEFINE(ethinf_proc_thread, ipp, osPriorityHigh, 4096, ethIntf);
ETHLIB_OS_THREAD_CREATE(ipp, ethIntf);
ethIntf->ipra = ipra_new();

View File

@ -249,6 +249,8 @@ void dhcp_request(ip4_addr reqAddr, ip4_addr dhcpServerAddr) {
}
static void dhcp_process(DhcpProps *props, DhcpOption *opts) {
MSG("ENTER\n");
ETHLIB_OS_MTX_LOCK(&s.procMtx); // LOCK!
switch (s.state) {
@ -314,6 +316,8 @@ static void dhcp_process(DhcpProps *props, DhcpOption *opts) {
}
ETHLIB_OS_MTX_UNLOCK(&s.procMtx); // RELEASE!
MSG("EXIT\n");
}
static int dhcp_resp_cb(const Pckt *pckt, PcktSieveLayerTag tag) {