Commit graph

105 commits

Author SHA1 Message Date
Amin Ben Ramdhane
bc400a368d Ticket refs#3005: fix issue in get schema method 2020-08-31 14:59:37 +01:00
Amin Ben Ramdhane
9b2fdc3562 Ticket refs #2845: fix add object issues 2020-08-31 10:22:31 +01:00
Daniel Danzberger
0e46e0630b operate: fix memory issues
- Fix memleak of not free'd json_tokener_parse memory
- Make read-only memory const

Note that this commit changes the operation input argument from
'char *' to 'json_object *', which breaks older dynamic_operate
implementations from outisde the bbf source tree.

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2020-08-27 12:43:48 +02:00
Amin Ben Ramdhane
f9d2c345f1 Ticket refs #2974: Referenced objects have trailing dot 2020-08-26 11:26:33 +01:00
Omar Kallel
7ec89f485b Fix InterfaceStack issues: Ethernet.Link, Bridge.x.Port. 2020-08-25 15:31:30 +01:00
Omar Kallel
e9755c741e Fix InterfaceStack issue case Lowerlayer is Ethernet.Link. 2020-08-25 15:30:49 +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
Rohit Topno
5dfeca7cdb bbf: Made ingress and egress qos mapping configurable through tr181.
Author:    Rohit Topno <r.topno@gxgroup.eu>
 Date:      Wed Aug 12 00:34:33 2020 +0530
2020-08-18 15:34:23 +02:00
Amin Ben Ramdhane
8bc317df54 bbf: clean mcast
- Move missing mcast functions from dmcommon file to mcast file
- Remove extern from function declarations
- Fix some indentation
- Comment unsupported parameters
2020-08-18 14:27:56 +01:00
Ratish
454be64405 igmp stats: Moved the mcast specific function to igmp file and mld file. 2020-08-18 12:07:41 +02:00
Daniel Danzberger
164250ca8e Add CMD_GET_INSTANCES
This new command will return all instances on a given path

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2020-08-06 10:34:41 +02:00
Vivek Kumar Dutta
32f5cb92dd dmcommon: Update boolean validator 2020-07-16 11:38:09 +02:00
Amin Ben Ramdhane
b408257e35 Enhance code structure 2020-07-08 18:38:08 +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
f3c9ed9efd PPP.Interface.: fix get value of stats parameters 2020-07-07 19:39:08 +01:00
Rahul
1cf9c8330f bbf: add support anywan type upstream iface in igmp
It was observed on dg400prime that the uci config was not correctly
generated when wan was of type anywan, this has been taken care of in
this patch. For anywan type IP interface, the list of upstream interfaces
is generated to keep each interface in mind. So, Device.IP.Interface.2
in this case will generate
	list upstream_interface 'eth5.1'
	list upstream_interface 'atm0.1'
	list upstream_interface 'ptm0.1'

test:
- Verify that config is correctly generated for normal interface.
- Verify that config is correctly generated for anywan interface.
- Verify that config is correctly generated for bridge interface.
2020-07-05 16:19:03 +05:30
vdutta
57ae1244cc obuspa: List supported operate commands 2020-06-29 12:50:01 +05:30
Amin Ben Ramdhane
2e4bc3688b UCI: added get value functions with a default value 2020-06-28 19:02:09 +01:00
Omar Kallel
9b8c23ee30 Enhance separation between libbbf_api and libbbfdm for list_enabled_lw_notify variable && fix warnings 2020-06-23 11:39:55 +01:00
Omar Kallel
856d4de5df enhance separation between libbbf_api and libbbfdm (functions: dm_update_file_enabled_notify, copy_temporary_file_to_original_file, del_list_fault_param, json functions) 2020-06-23 10:47:57 +01:00
Omar Kallel
ca758fd9f3 Enhance bbf libs separation: upnp_in_user_mask, list_execute_end_session, apply_end_session, cwmp_set_end_session 2020-06-23 10:47:46 +01:00
Omar Kallel
b6be5bdaa0 Enhance separation between libbbf_api and libbbfdm: apply for end_session_flag variable 2020-06-23 10:47:28 +01:00
Amin Ben Ramdhane
e4f1fd8653 WiFi: fix get/set value of SupportedFrequencyBands and OperatingFrequencyBand parameters 2020-06-22 16:43:17 +01:00
vdutta
ca77ff8d68 obuspa: Added object_type in GET_NAME method 2020-06-19 09:49:37 +01:00
Amin Ben Ramdhane
41fdc02419 Ticket refs #2746: TR-181: IPv6Prefix validation is not working 2020-06-13 00:32:02 +01:00
Daniel Danzberger
3b7fe9237b dm_strword: fix invalid memory access
Calling this dm_strword with an emtpy 'str' can cause invalid memory
access. This commit checks for an empty string.

NOTE: This function is insecure and can cause segfaults
      when 'str' is larger than 'source'

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2020-06-09 22:24:58 +02:00
Omar Kallel
4266617b1b extract add_list_value_change and send_active_value_change from dmctx 2020-06-04 17:06:23 +01:00
Amin Ben Ramdhane
efe2ca135b Device.IP: fix the get/set of IPv4Capable and IPv6Capable parameters 2020-05-31 20:57:52 +01:00
Omar Kallel
c97f46910d Fix uspd crash 2020-05-30 14:16:53 +01:00
Amin Ben Ramdhane
842d091a9e Device.IP. object: fix the get/set of IPv6Enable and IPv6Status parameters 2020-05-29 16:50:04 +01:00
Rahul
eb57cc407a bbf: remove unwanted changes
For the changes done in branch, some changes in dmcommon were overwritten
accidentally, reverting the same. Only leaves snooping mode related
changes in the branch now.
2020-05-29 13:02:19 +05:30
Rahul
c26f96fb76 bbf: add support for configuration of snooping mode
TR181 parameters introduced for configuration of snooping mode
for IGMP and MLD snooping and proxy objects.
2020-05-29 13:02:19 +05:30
Amin Ben Ramdhane
6ad215b7a6 TR-181: Device.DeviceInfo.Processor. object 2020-05-28 20:17:00 +01:00
Omar Kallel
2bf36bbbda Ticket refs #2673: TR069: No '4 value change' sent in case of active passive notification 2020-05-28 14:37:32 +01:00
Amin Ben Ramdhane
3f4a97c1af Ticket refs#2512: libbbf: an object should not be presented if the uci file or ubus object it depends on does not exist 2020-05-27 08:55:07 +01:00
Amin Ben Ramdhane
5f4659f054 ubus api: remove unused code and use libubus api by default 2020-05-27 08:47:30 +01:00
Amin Ben Ramdhane
85b5f603b5 Ticket refs#2585: TR-181: Device.InterfaceStack. object 2020-05-18 10:15:07 +01:00
Amin Ben Ramdhane
6acb70c71c Ticket refs #2582: libbbf: add support for handling macvlan interfaces 2020-05-17 16:18:42 +01:00
Amin Ben Ramdhane
3dd66344b3 Ticket refs #2511: libbbf: JSON schema support for Alias and Link 2020-05-12 00:59:17 +01:00
Amin Ben Ramdhane
f01badfef5 VLANTermination: fix some issues 2020-05-06 12:46:19 +01:00
vdutta
0a04451516 dmuci: Fix memory leak on add/delete objects 2020-05-05 16:43:04 +05:30
Amin Ben Ramdhane
15e9323b71 Ticket refs#2494: libbbf: wrong handling of multiple bridging object handling 2020-05-01 18:39:04 +01:00
Rahul
a8804c5a25 bbf: Fix bugs related to memory leak and linker
As per Amin's comments update the code to fix issue. Thanks
Amin for the review
2020-04-29 12:19:41 +05:30
Rahul
20f0c5211c bbf: add support for mld snooping and proxy
Added support for MLD configuration using the new proposed data
model.
Resolve bug in IGMP to be able to delete child objects when
parents are deleted from the dmmap_mcast file.
2020-04-28 11:31:31 +05:30
Rahul
458964164e bbf: Fix harcoding of Filter.Enable parameter and some improvements.
Remove the hard coded value of Filter.Enable and added configuration
support for the same.

Note: With this, I think I am ready to raise merge request for this,
I will finalise the mcastmngr changes now and then raise a merge request
once that is in iopsys devel
2020-04-28 11:31:31 +05:30
Rahul
e6da2d7f4a bbf: Fix uci for proxy interface
Changes done are:
1. Interfaces in the proxy uci section are called upstream_interface
   and downstream_interface as against proxy_interface and snooping_interface
   earlier.
2. The interface now bears the value of the actual linux interface, so,
   the upstream interface for example is now eth4.1 instead of wan.
3. A bug in the determining of bridging instance was identified and fixed.

The UCI looks as follows now:
root@iopsys:~# cat /etc/config/mcast

config proxy 'mproxy_1'
	option enable '0'
	option proto 'igmp'
	option version '2'
	option robustness '2'
	option aggregation '0'
	option last_member_query_interval '10'
	option query_interval '120'
	option query_response_interval '10'
	list downstream_interface 'br-wan100'
	list upstream_interface 'eth4.1'

config snooping 'msnoop_1'
	option enable '0'
	option proto 'igmp'
	option version '2'
	option robustness '2'
	option aggregation '0'
	option interface 'br-wan100'
2020-04-28 11:31:31 +05:30
Rahul
1b16a14089 bbf: add support for the new IGMP vendor extension
This commit caters to support for IGMP.Snooping and IGMP.Proxy objects except
for reading statistics in the form of Snooping.ClientGroup and Proxy.ClientGroup
objects.

ToDo:
1. Implement enable parameter for filter.

This is what it looks like btw:
root@iopsys:~# cat /etc/config/mcast

config snooping 'msnoop_1'
	option enable '0'
	option proto 'igmp'
	option version '2'
	option robustness '2'
	option aggregation '0'
	list filter '2.2.2.2'
	list filter '2.2.2.1'
	option interface 'br-wan'

config proxy 'mproxy_1'
	option enable '0'
	option proto 'igmp'
	option version '2'
	option robustness '2'
	option aggregation '0'
	list filter '1.1.1.1'
	list filter '1.1.1.2'
	list snooping_interface 'br-wan'
	list proxy_interface 'wan'

and the output of usp get is:
root@iopsys:~# ubus call usp get '{"path":"Device.X_IOPSYS_EU_IGMP."}'
{
	"X_IOPSYS_EU_IGMP": {
		"Proxy": [
			{
				"Aggregation": false,
				"Enable": false,
				"Filter": [
					{
						"Enable": false,
						"IPAddress": "1.1.1.1"
					},
					{
						"Enable": false,
						"IPAddress": "1.1.1.2"
					}
				],
				"FilterNumberOfEntries": 2,
				"ImmediateLeave": false,
				"Interface": [
					{
						"Interface": "Device.IP.Interface.1.",
						"Upstream": false
					},
					{
						"Interface": "Device.Bridging.Bridge.1.Port.1.",
						"Upstream": false
					}
				],
				"InterfaceNumberOfEntries": 2,
				"LastMemberQueryInterval": 0,
				"QueryInterval": 0,
				"QueryResponseInterval": 0,
				"Robustness": 2,
				"Version": "V2"
			}
		],
		"ProxyNumberOfEntries": 1,
		"Snooping": [
			{
				"Aggregation": false,
				"Enable": false,
				"Filter": [
					{
						"Enable": false,
						"IPAddress": "2.2.2.2"
					},
					{
						"Enable": false,
						"IPAddress": "2.2.2.1"
					}
				],
				"FilterNumberOfEntries": 2,
				"Interface": "Device.Bridging.Bridge.1.Port.1.",
				"Robustness": 2,
				"Version": "V2"
			}
		],
		"SnoopingNumberOfEntries": 1
	}

All objects/parameters were set using usp so we know that works.
2020-04-28 11:31:31 +05:30
Omar Kallel
073d2693f4 Device.Security fix bugs 2020-04-27 11:18:27 +01:00
Sukru Senli
fb34bcd008 security: collect certificates by section type instead of specific section name 2020-04-27 11:18:18 +01:00
Amin Ben Ramdhane
974309dc77 Fix compile errors on x86 environment 2020-04-26 13:44:26 +01:00