Commit Graph

3072 Commits

Author SHA1 Message Date
Steve Karg 43db974e50 added [feature#14] EventTimeStamp decoding from ReadPropertyMultiple app (#496)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-09-13 09:08:35 -05:00
Steve Karg b14177672b Fixed datetime decode of invalid tag. (#495)
* Fixed datetime decode of invalid application tag.

---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-09-12 15:11:52 -05:00
Steve Karg e9bdb15684 update security promise for 1.2.x branch 2023-09-11 19:16:39 -05:00
Steve Karg 62982f9308 added release script 2023-09-11 14:20:24 -05:00
Steve Karg 08b28dd6f4 fix github release to sf.net workflow 2023-09-11 11:37:53 -05:00
Steve Karg 7f619e4245 fix github release to sf.net workflow 2023-09-11 10:40:29 -05:00
Steve Karg 40956dec10 Updated version to 1.2.0 for release on 11-September-2023 2023-09-11 10:07:19 -05:00
Steve Karg 94dd465e7b Change mstpcap to either write to pipe or file, not both. (#492)
* Change mstpcap to either write to pipe or file, not both.

Fixed bug#83 of mstpcap.exe Permission Denied in Wireshark

---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-09-11 09:41:54 -05:00
bakmaria e4dd30ed89 Fix wrong calculation of frames in bacapp_data_len (#491)
* Fixed wrong calculation of data length.  In cases when 2 sets of opening & closing tags (first opening tag context tag is 3, second is 0) were sent, one of the frames wasn't added, and the resulted sum was wrong

* Added unit test for case with two sets of opening & closing tags
2023-09-11 09:41:06 -05:00
Steve Karg 55b8b3d93c fix BACnet/IP on OS to bind broadcast to specific port (#489)
* Fixes #346 by binding the broadcast socket to the port specific broadcast address rather than INADDR_ANY or INADDR_BROADCAST. Added additional compile and environment options for those who might need them. 

* Changed the define USE_CLASSADDR to BACNET_IP_BROADCAST_USE_CLASSADDR to help manage namespaces.

* Added BACNET_IP_BROADCAST_BIND_ADDR environment variable to override the default broadcast binding address.

---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-09-10 10:24:18 -05:00
Steve Karg 0001f85f29 Bugfix/network port object link speeds (#488)
* fix ports/xplained build under Linux

* fix network port object link-speeds property

---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-09-08 17:41:56 -05:00
Steve Karg bd597082d2 Fix ReinitializeDevice service handling of optional password (#487)
* Fix ReinitializeDevice service handling of optional password

* Improve ReinitializeDevice service unit testing

---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-09-08 14:58:04 -05:00
Steve Karg f641aacddb Bugfix/deprecate decode tag number and value (#481)
* added or updated secure the BACnet primitive value decoders - the core codecs - named bacnet_x_decode(), bacnet_x_application_decode() and bacnet_x_context_decode where x is one of the 13 BACnet primitive value names.  The updated API includes an APDU size to prevent over-reading of an APDU buffer while decoding.  Improved or added unit test code coverage for the BACnet primitive value decoders.

* marked the insecure decoding API as 'deprecated' which is defined in src/bacnet/basic/sys/platform.h and can be disabled during a build. 

* added secure decoders for BACnetTimeValue, BACnetHostNPort, BACnetTimeStamp, BACnetAddress, and Weekly_Schedule and improved unit test code coverage.

* improved test code coverage for BACnet objects and properties.

* secured AtomicReadFile and AtomicWriteFile service decoders and improved unit test code coverage.

* secured BACnet Error service decoder and improved unit test code coverage.

---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-09-08 11:39:27 -05:00
dependabot[bot] bc8c261153 Bump actions/checkout from 3 to 4 (#484)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-06 13:53:52 -05:00
Steve Karg f61f4300be Feature/add create object service (#476)
Added BACnet CreateObject and DeleteObject services

* refactored codec for BACnetPropertyValue into bacapp module
* added unit tests for BACnetPropertyValue
* refactored COV and Events to use BACnetPropertyValue codec API
* added unit tests for COV
* added overrun safe decoders for tag numbers and boolean context
* added unit tests and codecs for CreateObject and DeleteObject services
* added APDU service handers and senders for CreateObject and DeleteObject services
* added command line apps bacco and bacdo for CreateObject and DeleteObject services
* added CreateObject and DeleteObject service handling in example server app and device object
* added new BACnetRejectReason, Error Class, and BACnetAbortReason enumerations and conversions

---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-08-28 13:02:35 -05:00
Steve Karg 8184afea12 Chore/make test parallel build limits (#480)
* re-enable parallel build for CMake unit tests, but limited to ncores on supported OSes. Using MAKEFLAGS in .bashrc to set the '-j' flag size causes problem for Makefile build of BACnet library which doesn't tolerate parallel builds.  Using "-j" without limits for CMake of unit tests overwhelms my lesser endowed build machines.

---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-08-25 15:15:32 -05:00
Steve Karg c383514a62 Chore/fix release script tools archive (#479)
* fix the tool archive for release script

* fix the source archive for release script

---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-08-25 11:17:30 -05:00
Steve Karg 58a6373ffb Update release.yml (#472)
fix tag name from releases
2023-08-21 08:56:24 -05:00
Steve Karg ac9b99d46c Update change log for v1.1.2 2023-08-18 15:20:24 -05:00
Steve Karg 8a4d530caf Incremented version to 1.1.2 for release on 18-Aug-2023 2023-08-18 15:20:14 -05:00
Steve Karg a7012fbd12 Feature/add release script (#471)
* add release script

* updated changelog

---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-08-18 14:59:01 -05:00
Steve Karg 2a15a451d0 improve router-mstp app usage (#470)
* improve router-mstp app usage

* add router-mstp app environment shell script

---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-08-15 11:24:22 -05:00
Steve Karg 2b35883df6 Added MSTP Slave Node option to stm32f10x port (#467)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-08-07 09:45:30 -05:00
anthony-crystalpeak acb3b0f57d [libbacnet]: bacapp_data_len() + bacnet_tag_number_and_value_decode() (#453)
* Bugfix: bacapp_data_len() + bacnet_tag_number_and_value_decode()

* Fix bacnet_tag_number_and_value_decode function.
Add read buffer safe functions for opening, closing, context specific tags.
Fix bacapp_data_len function changes as indicated by unit testing.

* refactor bacapp_data_len
---------
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-07-31 16:50:14 -05:00
Mateusz Klatecki 28de333b6e Fix encode_context_bacnet_address (#464)
the original solution caused that after encode_bacnet_address the apdu pointer was moved too far because apdu_len took into account the length of the opening_tag
2023-07-31 11:24:25 -05:00
Greg Shue dad9e13485 Issues/issue 461 update to zephyr v3 4 0 in ci (#463)
* [WIP] Remove unit testcases duplicated under non-unit tree

* [WIP] Update west.yml to Zephyr v3.3.0 (twister verified)

* Update CI to Zephyr v3.4.0 w/ reduced module set

- Update zephyr/module.yml to use Zephyr v3.4.0 + cmsis;
- Update tests to use ZTEST_NEW_API for zephyr builds

Verified by:

1. make clean test
2. ./zephyr/scripts/twister -p unit_testing -T bacnet/zephyr/tests/bacnet

---------

Co-authored-by: Gregory Shue <gregory.shue@legrand.com>
2023-07-26 14:47:01 -07:00
Greg Shue 3f7a4d2e19 Trim west.yml imported repository set (#460) (#462)
Verified by:

1. cd $workspace && \
   rm -rf modules/ && \
   west update && \
   zephyr/scripts/twister -p unit_testing \
      -T bacnet-stack/zephyr/tests/

   Visually verified all tests passed.

Signed-off-by: Greg Shue <greg.shue@outlook.com>
2023-07-24 20:36:03 -05:00
Steve Karg 077be0005f Fix spurious interrupts from STM32 ORE (#456)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-07-17 13:49:59 -05:00
Steve Karg 7db03ac5e5 Fix spurious interrupts from STM32 ORE (#456)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-07-17 13:49:40 -05:00
anthony-crystalpeak fcc9647983 AFL + Libfuzzer harnesses (#455)
* Package fuzzers

* Provide ability to remove main

* Don't build fuzzers by default
2023-07-17 10:06:32 -05:00
Steve Karg 9e7f8978fa fix router apps action for unknown dnet (#454)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-07-13 16:52:30 -05:00
anthony-crystalpeak da4db7c65e BUG: Prevent npdu_len from wrapping around at npdu_len=1 (#452) 2023-07-13 14:44:48 -05:00
anthony-crystalpeak 758cac3bed DOS: port might be null (#451) 2023-07-13 14:12:38 -05:00
Steve Karg 2bf1e9a548 Bugfix/writeproperty app known property (#450)
* Fix write-property app known property option

* Fix write-property app priority handling

---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-07-13 10:21:21 -05:00
Steve Karg 4efaf097c0 Fix [bug#80] npdu_decode via deprecation (#447)
* Fix [bug#80] npdu_decode via deprecation

---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-07-10 17:27:10 -05:00
Steve Karg 13c85db4cb Fix [bug#79] Out of bounds jump in h_apdu.c:apdu_handler (#446)
* Fix [bug#79] Out of bounds jump in h_apdu.c:apdu_handler
---------
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-07-10 15:15:55 -05:00
Steve Karg 1cfe6ee80f update change log 2023-07-08 09:49:43 -05:00
Jefrin da8f93ad79 Fix segfault on mstp cleanup on linux port (#445) 2023-07-08 09:47:50 -05:00
Steve Karg 7bac8aa0bd Add bitstring to minimal config (#443)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-07-08 09:14:23 -05:00
Steve Karg dbed4040ae Improve MSTP debug. Fix WhoIs app APDU timeout. (#444)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-07-08 09:13:56 -05:00
Steve Karg 95174ce96e added changelog. updated security statement. 2023-07-02 09:43:01 -05:00
Steve Karg d9d61b4ba7 Merge remote-tracking branch 'origin/master' into bacnet-stack-1.1 2023-06-30 17:49:05 -05:00
Steve Karg cfe3086ae5 increment version to 1.1.1 for release on 30-June-2023 2023-06-30 17:09:02 -05:00
Steve Karg b676f09c4b Merge branch 'master' 2023-06-30 17:04:23 -05:00
Steve Karg a9c2474534 Fix BACnetARRAY encoder for index=ALL (#442)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-06-30 15:39:15 -05:00
Steve Karg 5b7eac60cf cleaned up lwIP function header javadoc (#441)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-06-28 12:46:56 -05:00
Steve Karg db21bf1bfa Increment version to 1.1.0 for release 2023-06-25 09:32:15 -05:00
Steve Karg a4750b8999 Increment version to 1.1.0 for release 2023-06-25 09:31:07 -05:00
Steve Karg 9bb367982b Improve MSTP debug. Fix WhoIs app APDU timeout. 2023-06-25 09:27:05 -05:00
Steve Karg c8a6ea74b8 Fix WPM decoding. Add unit test for WPM. (#438)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-06-14 17:25:38 -05:00