Commit graph

53 commits

Author SHA1 Message Date
vdutta
720ebfa873 Build cpack release for downstream job 2022-06-10 14:31:42 +00:00
suvendhu
889c15feeb Fix ticket#7333 fix cppcheck warnings 2022-02-22 18:24:19 +05:30
Amin Ben Ramdhane
080f7b4f85 Ticket refs #7333: fix warnings, code analysis and clean up the code
- Fix all errors catched by cppcheck threadsafety (cppcheck --error-exitcode=0 --addon=threadsafety bbf)
 - Fix some errors catched by cppcheck cert (cppcheck --error-exitcode=0 --addon=cert bbf)
 - Add new str-protected macros instead of using str functions directly to avoid crashes
2022-02-16 10:33:59 +00:00
Amin Ben Ramdhane
c3ea9e5597 Ticket refs #6892: Parameters used for pathname reference cannot be set to empty 2022-01-10 10:20:03 +01:00
Neeraj Bijalwan
2864ddeacd Add version in parameters 2021-11-03 09:30:12 +01:00
Amin Ben Ramdhane
42bc8e95a7 Ticket refs #5773: improve and simplify handle instance in browser and add functions 2021-09-09 16:56:02 +00:00
Arun Muthusamy
87b3664f95 Bug_5668: Fix time refrences in dm object
Add preferred shift time to the UTC time

ValidLifetime parameter: Replace localtime with UTC time

RouteLifetime parameter: Replace localtime with UTC time

IPv6 PreferredLifetime parameter: Replace localtime with UTC time

Security LastModif parameter: Replace localtime with UTC time

AssociationTime parameter: Replace localtime with UTC time

IPV6 PreferredLifetime, ValidLifetime parameter: Replace localtime with UTC time

DHCPv6 PreferredLifetime, ValidLifetime parameter: Replace localtime with UTC time

Add dm_time_utc_format function to get UTC time format

DHCPv4 LeaseTimeRemaining parameter: Replace localtime with UTC time

DeviceInfo Date parameter: Replace localtime with UTC time

DynamicDNS LastUpdate parameter: Replace localtime with UTC time

VoiceService ExpireTime parameter: Replace localtime with UTC time

Backup() parameter: Replace localtime with UTC time
2021-08-04 09:44:02 +02:00
Amin Ben Ramdhane
5e97bdb5e4 bbf: add support for vendor extension 2021-03-25 16:06:31 +01:00
Amin Ben Ramdhane
cdad11d92d Ticket refs #4386: dm_validate_string in libbbf_api requires length of enumeration and pattern arrays to be hardcoded at caller
- use NULL-terminated arrays instead of providing length by the caller
2021-02-15 21:13:18 +01:00
Amin Ben Ramdhane
92d1f62cab bbf: cleanup
- fix flawfinder and cppcheck issues
 - remove all unused functions
2021-02-10 17:31:55 +01:00
Amin Ben Ramdhane
54e296a989 Routing: use 'l3_device' instead of 'device' to find the corresponding interface for dynamic routes 2021-02-06 22:21:57 +01:00
Amin Ben Ramdhane
a027c5097d Routing: Multiple fixes
- Device.Routing.Router.{i}.IPv4Forwarding.{i}.: fix a crash in add method
 - Device.Routing.Router.{i}.IPv{4,6}Forwarding.{i}.: implement the delete method for all instances instead of returning 9005 error
 - Device.Routing.Router.{i}.IPv6Forwarding.{i}.ForwardingPolicy: change its default permission according to the standard
 - Device.Routing.Router.{i}.IPv6Forwarding.{i}.Alias: fix get/set method
 - Update the default value of DMRouting struct in order to fix the setting of parameters via obuspa
2021-02-02 15:07:16 +01:00
Amin Ben Ramdhane
af86cbf2f5 Ticket refs #4300 & #4301 : Device.Routing.Router.{i}.{IPv4,IPv6}Forwarding instance created with incorrect default value
*/ add support for route6_disabled section when disabling static route6
*/ Fix set method of Device.Routing.Router.{i}.IPv4Forwarding.{i}.Enable
*/ Fix get/set method of Device.Routing.Router.{i}.IPv6Forwarding.{i}.Enable
*/ below the list of fixed parameters:

 - Device.Routing.Router.{i}.IPv4Forwarding.{i}.DestIPAddress should be empty
 - Device.Routing.Router.{i}.IPv4Forwarding.{i}.DestSubnetMask should be empty
 - Device.Routing.Router.{i}.IPv4Forwarding.{i}.Enable should be false
 - Device.Routing.Router.{i}.IPv4Forwarding.{i}.Status should be Disabled
 - Device.Routing.Router.{i}.IPv4Forwarding.{i}.GatewayIPAddress should be Empty
 - Device.Routing.Router.{i}.IPv4Forwarding.{i}.ForwardingMetric should be -1
 - Device.Routing.Router.{i}.IPv6Forwarding.{i}.DestIPPrefix should be empty
 - Device.Routing.Router.{i}.IPv6Forwarding.{i}.NextHop should be empty
 - Device.Routing.Router.{i}.IPv6Forwarding.{i}.Interface should be empty
 - Device.Routing.Router.{i}.IPv6Forwarding.{i}.Enable should be false
 - Device.Routing.Router.{i}.IPv6Forwarding.{i}.Status should be Disabled
 - Device.Routing.Router.{i}.IPv6Forwarding.{i}.ForwardingMetric should be -1
2021-02-01 15:56:39 +01:00
Amin Ben Ramdhane
9c70a16884 bbf: add the missing pattern => "^$" 2021-02-01 15:55:51 +01:00
Amin Ben Ramdhane
3258396176 Ticket refs #4279: AddressingType and Origin parameters not IPCP when proto is PPPoE 2021-01-26 17:56:54 +01:00
Amin Ben Ramdhane
af7190b6c5 Ticket refs #4207: Adding static route via UCI network config is causing libbbf to crash when Device.Routing object is queried 2021-01-20 21:52:46 +01:00
Amin Ben Ramdhane
8c25b2ff87 Device.Routing.Router.1.IPv6Forwarding.{}.Origin: set it to DHCPv6 if the route is dynamic 2020-12-23 09:48:38 +01:00
Amin Ben Ramdhane
b9a12b057b remove tr064 feature and cleanup 2020-12-16 10:03:25 +01:00
Amin Ben Ramdhane
3906faa12d Ticket refs #3730: bbf: fix Static Code Analysis 2020-12-16 10:00:19 +01:00
Amin Ben Ramdhane
44b6c08273 Fix add method based on the latest changes
update_instance: read config and type section from the passed section
2020-12-07 21:59:00 +01:00
Amin Ben Ramdhane
5d10fba083 bbf: improve and cleanup the code
- update_instance_alias: read config and type section from the passed section in handle_update_instance
 - remove append_dot_to_string() function
2020-12-06 22:18:18 +01:00
Amin Ben Ramdhane
18643f29b3 bbf: enhance the code
- remove unused argument from dmuci_add_section() and dmuci_add_section_bbfdm() functions
 - use snprintf instead of dmasptintf
 - change function name: add_list_paramameter -> add_list_parameter
2020-11-23 10:58:48 +01:00
Omar Kallel
c8de221c11 Ticket refs #3725: bbf: remove unnecessary arguments from object/parameter definition 2020-11-17 16:21:11 +01:00
Amin Ben Ramdhane
437273a254 Ticket refs #3489: TR181: Invalid enumeration parameter values 2020-11-11 11:32:14 +01:00
Amin Ben Ramdhane
6da9750f96 bbf: Fixed crash on QEMU 2020-10-23 12:17:40 +01:00
Amin Ben Ramdhane
8ba74d624b bbf: add unique_keys argument to the comment
-  change (const char *[]) -> LIST_KEY
2020-10-17 14:54:33 +01:00
Amin Ben Ramdhane
5839164c29 TR-181: Fixed invalid int && unsignedInt && hexBinary parameter values 2020-10-17 14:08:40 +01:00
Amin Ben Ramdhane
a07102c32b Get_schema: add the missing unique keys for TR181 and TR104
- Update JSON files for tr181 and tr104
- Update the generator
2020-10-14 16:33:02 +01:00
Shubham Sharma
a9fc190ed1 get_schema: Get unique keys from multi instance objects
- As per TR181, there could be one or more unique keys for each
   multi-instance object. Added support to get the unique keys
   associated with the multi-instance object.
 - Changes for generate_source_code.sh to have unique keys as
   extra object parameter.
2020-10-13 10:51:47 +01:00
Amin Ben Ramdhane
ef0d2e9f6b Ticket refs#3480: TR-181: Invalid IPv6Adress parameter values 2020-10-12 18:56:52 +01:00
Amin Ben Ramdhane
027d8fb599 bbf: save diagnostics data under '/etc/bbfdm/dmmap_diagnostics' instead of '/vat/state/cwmp' 2020-09-28 10:08:13 +01:00
Omar Kallel
92cdf363f5 Ticket refs #3228: QEMU - ICWMP is segfaulting 2020-09-21 17:48:26 +01:00
Amin Ben Ramdhane
9b2fdc3562 Ticket refs #2845: fix add object issues 2020-08-31 10:22:31 +01:00
Amin Ben Ramdhane
f9d2c345f1 Ticket refs #2974: Referenced objects have trailing dot 2020-08-26 11:26:33 +01:00
Amin Ben Ramdhane
bbecdd7444 Ticket refs #2845: bbf: add support the case uci config is updated manually 2020-08-22 16:37:32 +01:00
vdutta
bfd4f7bae5 obuspa: Get data model schema present in DUT
- Obuspa required to register the schema present in DUT, in the
 current methods, for multi-instance objects the instance is only
 visible if at-least one object/instance present, this leads to
 anomaly in obuspa, when some objects getting created in run-time.
 e.g: Device.WiFi.AccessPoint.1.AssociatedDevice.
 - This change will dump the complete schema irrespective of that node/object
 availability.
2020-07-08 13:51:42 +02:00
Amin Ben Ramdhane
2e4bc3688b UCI: added get value functions with a default value 2020-06-28 19:02:09 +01:00
Amin Ben Ramdhane
00c60187fb Ticket refs #2483: TR-181: most Alias values are empty 2020-04-20 00:18:52 +01:00
Amin Ben Ramdhane
8f500aab97 Revert "Ticket refs #2483: TR-181: most Alias values are empty" 2020-04-17 13:45:45 +01:00
Amin Ben Ramdhane
4c4d298b0d Ticket refs #2483: TR-181: most Alias values are empty 2020-04-17 13:04:51 +01:00
Amin Ben Ramdhane
67891bd0e4 Fix compiler errors on x86 environment 2020-04-12 17:58:39 +01:00
Amin Ben Ramdhane
a1f7ce98cf Ticket refs #1254: Improvement validation parameters 2020-03-13 16:28:32 +01:00
Daniel Danzberger
521e38a853 Fix snprintf destination buffer sizes
Fixes snprintf truncated output compiler warnings.

Example:
--
../dmentrylibrary.c:31:38: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=]
   31 |     snprintf(buf, sizeof(buf), "%s/%s", folder_path, entry->d_name);
      |                                      ^
../dmentrylibrary.c:31:5: note: ‘snprintf’ output 2 or more bytes (assuming 257) into a destination of size 256
   31 |     snprintf(buf, sizeof(buf), "%s/%s", folder_path, entry->d_name);
--

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2020-03-10 14:34:08 +01:00
Daniel Danzberger
0460307fb4 Only export symbols to the library that belong to the API interface
This commit makes all symbols that are not part of the API Interface,
or used only in the object files where they are defined, static.

Causing the following benefits:
 - The compiler can resolve functions for better performance
 - The library size is decreased

NOTE: Spec file generators need to be adjusted for newer spec's to not do the same mistakes again

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2020-03-09 21:23:57 +01:00
Amin Ben Ramdhane
905d78844c Ticket refs #1254: TR-x69: add support for parameter validation 2020-02-20 23:25:49 +01:00
Daniel Danzberger
e113575168 Fix undefined reference errors when linking aginst libbbfdm.so
Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2020-02-19 11:51:27 +01:00
Amin Ben Ramdhane
ff14c27fc3 clean up the source code
- remove unused variables
- fix coding style of most function (Indentation, Tabulation, ..)
- check the source code using cppcheck tool
- change sprintf by snprintf
2020-02-12 19:08:49 +01:00
Amin Ben Ramdhane
4ab526b9f2 Ticket refs#1598: libbbfdm: plug-in based with support for dynamic loading of libraries + separate libbbfdm into two libraries: libbbf_api (API) and libbbfdm (data model) 2020-01-21 22:43:37 +01:00
Sukru Senli
1e11720828 Change License to LGPLv2.1 2019-12-04 09:52:05 +01:00
Amin Ben Ramdhane
d4298475a3 Ticket refs #1262: bbf-datamodels: dynamic addition of datamodel parameters 2019-10-17 15:58:22 +01:00