Commit graph

83 commits

Author SHA1 Message Date
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
Amin Ben Ramdhane
09048693c7 Ticket refs#2494: bbf: multiple bridging object handling 2020-04-26 13:17:26 +01:00
Omar Kallel
87dd13f4d5 Segmentation fault fixe for Security browse object 2020-04-24 11:35:07 +01:00
Daniel Danzberger
4d67121a68 Revert "change strcat->strncat"
This reverts commit c0a476dec0.
2020-04-22 10:08:39 +02:00
Daniel Danzberger
a3113301be Fix compile error on 64 bit systems
Fixes casting pointers of invallid size to int.

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2020-04-22 10:07:30 +02: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
c0a476dec0 change strcat->strncat 2020-04-16 18:16:26 +01:00
Omar Kallel
da40d40d35 dmasprintf: check negatif size case 2020-04-14 10:00:05 +01:00
Amin Ben Ramdhane
67891bd0e4 Fix compiler errors on x86 environment 2020-04-12 17:58:39 +01:00
Amin Ben Ramdhane
cd391b939b Ticket refs#2344: TR-181: Correct implementation of Device.Ethernet.VLANTermination 2020-04-08 21:51:23 +01:00
Omar Kallel
3094867d3e Ticket refs #2337: Device.USB. TR181 object: fix issues related to Set/Get of some parameters 2020-04-02 10:52:40 +01:00
Jomily K Joseph
dc554fa385 bbf : Updated some functions and resolved vlan deployment issues.
- Fixed issue in Ethernet Link deletion.
- Fixed deletion of untagged interfaces section from UCI.
- Fixed in setting lower layers for Ethernet link in case of untagged management interface.
- Fixed issue of adding same ports with different vlan id under different bridge.
2020-04-01 12:08:39 +02:00
Amin Ben Ramdhane
3589aabbc4 Cleanup + remove unused function and struct + improvement the source code 2020-03-29 14:24:51 +01:00
Amin Ben Ramdhane
0adb74f0ae dmubus: added handling for integer arguments 2020-03-28 19:44:07 +01:00
Amin Ben Ramdhane
fa92e8af22 Bridge object: source code improvement
*) remove unused function
*) add missing validation function
*) fix some issues
2020-03-27 21:13:10 +01:00
Amin Ben Ramdhane
f1a7b2cbaf VLANTermination: remove vlan_method option 2020-03-25 16:18:57 +01:00
Amin Ben Ramdhane
50f8d36627 Fix indentation 2020-03-25 12:38:52 +01:00
Jomily K Joseph
fa07b8c3b6 bbf: Layer2 Vlan Deployment changes
- Changes done in IP.Interface, Device.Ethernet, Bridging.Bridge objects.
2020-03-25 11:45:10 +01:00
Omar Kallel
a25b8584cb Fix bugs: Device.WiFi.Radio 2020-03-19 09:45:26 +01:00
Amin Ben Ramdhane
bf8737c49e Update the time format according to the standard 2020-03-17 14:11:52 +01:00
Amin Ben Ramdhane
ce8bf4e319 Update the time format according to the standard 2020-03-16 23:29:02 +01:00
Omar Kallel
e92a4d81b2 Improve dmasprintf function: dynamic allocation instead of buffer fix size 2020-03-16 17:02:54 +01:00
Amin Ben Ramdhane
a1f7ce98cf Ticket refs #1254: Improvement validation parameters 2020-03-13 16:28:32 +01:00