The NDPU priority is now passed through the stack via apdu.c or h_apdu.c module so the MS/TP compare DER function can include the value in the comparison. (#1119)

This commit is contained in:
Steve Karg
2025-10-16 10:31:21 -05:00
committed by GitHub
parent d4d928a915
commit b726458ab9
12 changed files with 10 additions and 52 deletions
+2
View File
@@ -132,6 +132,8 @@ The git repositories are hosted at the following sites:
### Fixed ### Fixed
* Fixed the MS/TP compare DER function which can now include the NPDU network
priority in the comparison. (#1119)
* Fixed basic program object internal datatype for reason-for-fault * Fixed basic program object internal datatype for reason-for-fault
and change properties. (#1110) and change properties. (#1110)
* Fixed compile errors in basic/server/device when BACAPP_TIMESTAMP * Fixed compile errors in basic/server/device when BACAPP_TIMESTAMP
-4
View File
@@ -285,13 +285,9 @@ static bool dlmstp_compare_data_expecting_reply(const uint8_t *request_pdu,
reply.npdu_data.protocol_version) { reply.npdu_data.protocol_version) {
return false; return false;
} }
#if 0
/* the NDPU priority doesn't get passed through the stack, and
all outgoing messages have NORMAL priority */
if (request.npdu_data.priority != reply.npdu_data.priority) { if (request.npdu_data.priority != reply.npdu_data.priority) {
return false; return false;
} }
#endif
if (!bacnet_address_same(&request.address, &reply.address)) { if (!bacnet_address_same(&request.address, &reply.address)) {
return false; return false;
} }
-4
View File
@@ -286,13 +286,9 @@ static bool dlmstp_compare_data_expecting_reply(const uint8_t *request_pdu,
reply.npdu_data.protocol_version) { reply.npdu_data.protocol_version) {
return false; return false;
} }
#if 0
/* the NDPU priority doesn't get passed through the stack, and
all outgoing messages have NORMAL priority */
if (request.npdu_data.priority != reply.npdu_data.priority) { if (request.npdu_data.priority != reply.npdu_data.priority) {
return false; return false;
} }
#endif
if (!bacnet_address_same(&request.address, &reply.address)) { if (!bacnet_address_same(&request.address, &reply.address)) {
return false; return false;
} }
+2 -6
View File
@@ -292,15 +292,11 @@ static bool dlmstp_compare_data_expecting_reply(
"NPDU Protocol Version mismatch.\n"); "NPDU Protocol Version mismatch.\n");
return false; return false;
} }
#if 0
/* the NDPU priority doesn't get passed through the stack, and
all outgoing messages have NORMAL priority */
if (request.npdu_data.priority != reply.npdu_data.priority) { if (request.npdu_data.priority != reply.npdu_data.priority) {
debug_printf( debug_printf("DLMSTP: DER Compare failed: "
"DLMSTP: DER Compare failed: " "NPDU Priority mismatch.\n"); "NPDU Priority mismatch.\n");
return false; return false;
} }
#endif
if (!bacnet_address_same(&request.address, &reply.address)) { if (!bacnet_address_same(&request.address, &reply.address)) {
debug_printf("DLMSTP: DER Compare failed: " debug_printf("DLMSTP: DER Compare failed: "
"BACnet Address mismatch.\n"); "BACnet Address mismatch.\n");
+2 -6
View File
@@ -563,15 +563,11 @@ static bool dlmstp_compare_data_expecting_reply(
"NPDU Protocol Version mismatch.\n"); "NPDU Protocol Version mismatch.\n");
return false; return false;
} }
#if 0
/* the NDPU priority doesn't get passed through the stack, and
all outgoing messages have NORMAL priority */
if (request.npdu_data.priority != reply.npdu_data.priority) { if (request.npdu_data.priority != reply.npdu_data.priority) {
debug_printf( debug_printf("DLMSTP: DER Compare failed: "
"DLMSTP: DER Compare failed: " "NPDU Priority mismatch.\n"); "NPDU Priority mismatch.\n");
return false; return false;
} }
#endif
if (!bacnet_address_same(&request.address, &reply.address)) { if (!bacnet_address_same(&request.address, &reply.address)) {
debug_printf("DLMSTP: DER Compare failed: " debug_printf("DLMSTP: DER Compare failed: "
"BACnet Address mismatch.\n"); "BACnet Address mismatch.\n");
+2 -6
View File
@@ -293,15 +293,11 @@ static bool dlmstp_compare_data_expecting_reply(
"NPDU Protocol Version mismatch.\n"); "NPDU Protocol Version mismatch.\n");
return false; return false;
} }
#if 0
/* the NDPU priority doesn't get passed through the stack, and
all outgoing messages have NORMAL priority */
if (request.npdu_data.priority != reply.npdu_data.priority) { if (request.npdu_data.priority != reply.npdu_data.priority) {
debug_printf( debug_printf("DLMSTP: DER Compare failed: "
"DLMSTP: DER Compare failed: " "NPDU Priority mismatch.\n"); "NPDU Priority mismatch.\n");
return false; return false;
} }
#endif
if (!bacnet_address_same(&request.address, &reply.address)) { if (!bacnet_address_same(&request.address, &reply.address)) {
debug_printf("DLMSTP: DER Compare failed: " debug_printf("DLMSTP: DER Compare failed: "
"BACnet Address mismatch.\n"); "BACnet Address mismatch.\n");
+2 -6
View File
@@ -507,15 +507,11 @@ static bool dlmstp_compare_data_expecting_reply(
"NPDU Protocol Version mismatch.\n"); "NPDU Protocol Version mismatch.\n");
return false; return false;
} }
#if 0
/* the NDPU priority doesn't get passed through the stack, and
all outgoing messages have NORMAL priority */
if (request.npdu_data.priority != reply.npdu_data.priority) { if (request.npdu_data.priority != reply.npdu_data.priority) {
debug_printf( debug_printf("DLMSTP: DER Compare failed: "
"DLMSTP: DER Compare failed: " "NPDU Priority mismatch.\n"); "NPDU Priority mismatch.\n");
return false; return false;
} }
#endif
if (!bacnet_address_same(&request.address, &reply.address)) { if (!bacnet_address_same(&request.address, &reply.address)) {
debug_printf("DLMSTP: DER Compare failed: " debug_printf("DLMSTP: DER Compare failed: "
"BACnet Address mismatch.\n"); "BACnet Address mismatch.\n");
-4
View File
@@ -607,13 +607,9 @@ static bool mstp_compare_data_expecting_reply(uint8_t *request_pdu,
reply.npdu_data.protocol_version) { reply.npdu_data.protocol_version) {
return false; return false;
} }
#if 0
/* the NDPU priority doesn't get passed through the stack, and
all outgoing messages have NORMAL priority */
if (request.npdu_data.priority != reply.npdu_data.priority) { if (request.npdu_data.priority != reply.npdu_data.priority) {
return false; return false;
} }
#endif
if (!bacnet_address_same(&request.address, &reply.address)) { if (!bacnet_address_same(&request.address, &reply.address)) {
return false; return false;
} }
-4
View File
@@ -615,13 +615,9 @@ static bool mstp_compare_data_expecting_reply(uint8_t *request_pdu,
reply.npdu_data.protocol_version) { reply.npdu_data.protocol_version) {
return false; return false;
} }
#if 0
/* the NDPU priority doesn't get passed through the stack, and
all outgoing messages have NORMAL priority */
if (request.npdu_data.priority != reply.npdu_data.priority) { if (request.npdu_data.priority != reply.npdu_data.priority) {
return false; return false;
} }
#endif
if (!bacnet_address_same(&request.address, &reply.address)) { if (!bacnet_address_same(&request.address, &reply.address)) {
return false; return false;
} }
-4
View File
@@ -404,13 +404,9 @@ bool dlmstp_compare_data_expecting_reply(
reply.npdu_data.protocol_version) { reply.npdu_data.protocol_version) {
return false; return false;
} }
#if 0
/* the NDPU priority doesn't get passed through the stack, and
all outgoing messages have NORMAL priority */
if (request.npdu_data.priority != reply.npdu_data.priority) { if (request.npdu_data.priority != reply.npdu_data.priority) {
return false; return false;
} }
#endif
if (!bacnet_address_same(&request.address, &reply.address)) { if (!bacnet_address_same(&request.address, &reply.address)) {
return false; return false;
} }
-4
View File
@@ -268,13 +268,9 @@ static bool dlmstp_compare_data_expecting_reply(
reply.npdu_data.protocol_version) { reply.npdu_data.protocol_version) {
return false; return false;
} }
#if 0
/* the NDPU priority doesn't get passed through the stack, and
all outgoing messages have NORMAL priority */
if (request.npdu_data.priority != reply.npdu_data.priority) { if (request.npdu_data.priority != reply.npdu_data.priority) {
return false; return false;
} }
#endif
if (!bacnet_address_same(&request.address, &reply.address)) { if (!bacnet_address_same(&request.address, &reply.address)) {
return false; return false;
} }
-4
View File
@@ -225,13 +225,9 @@ static bool MSTP_Compare_Data_Expecting_Reply(
reply.npdu_data.protocol_version) { reply.npdu_data.protocol_version) {
return false; return false;
} }
#if 0
/* the NDPU priority doesn't get passed through the stack, and
all outgoing messages have NORMAL priority */
if (request.npdu_data.priority != reply.npdu_data.priority) { if (request.npdu_data.priority != reply.npdu_data.priority) {
return false; return false;
} }
#endif
if (!bacnet_address_same(&request.address, &reply.address)) { if (!bacnet_address_same(&request.address, &reply.address)) {
return false; return false;
} }