Skip to content

Commit

Permalink
Merge pull request #78 from carlfriess/master
Browse files Browse the repository at this point in the history
Ignore invalid function codes sent to other servers
  • Loading branch information
debevv authored Dec 15, 2024
2 parents a1705c0 + c81ad17 commit 4b1f629
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nanomodbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -1878,7 +1878,8 @@ static nmbs_error handle_req_fc(nmbs_t* nmbs) {
#endif
default:
flush(nmbs);
err = send_exception_msg(nmbs, NMBS_EXCEPTION_ILLEGAL_FUNCTION);
if (!nmbs->msg.ignored && !nmbs->msg.broadcast)
err = send_exception_msg(nmbs, NMBS_EXCEPTION_ILLEGAL_FUNCTION);
}

return err;
Expand Down

0 comments on commit 4b1f629

Please sign in to comment.