Commit graph

79 commits

Author SHA1 Message Date
Amin Ben Ramdhane
e24f7bf8ac Ticket refs #3813: TR-181: Incorrect implementation of some of Device.DHCPv4.and Device.DHCPv6. objects/parameters
Fix Get/Set value of these parameters which has a hexbinary encoded value according to the TR-181 standard
 - Device.DHCPv4.Server.Pool.{i}.Option.{i}.Value
 - Device.DHCPv4.Client.{i}.SentOption.{i}.Value
 - Device.DHCPv4.Relay.Forwarding.{i}.UserClassID
 - Device.DHCPv6.Server.Pool.{i}.VendorClassID
 - Device.DHCPv6.Server.Pool.{i}.UserClassID
 - Device.DHCPv6.Server.Pool.{i}.Option.{i}.Value
2020-11-18 20:02:31 +01:00
Shubham Sharma
34f9f678f9 TR-181: Check for -ve value under dm_validate_unsignedInt 2020-11-18 13:03:56 +01:00
Omar Kallel
3d740e4a66 Segmentation fault fix 2020-11-18 09:54:08 +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
d1d60dfbe0 Ticket refs #3805: TR-181: Device.DHCPv4.Server.Pool.{i}.Client.{i}.Option.{i}.
- Implement Device.DHCPv4.Server.Pool.{i}.Client.{i}.Option.{i}. object
 - Implement Device.DHCPv4.Server.Pool.{i}.Client.{i}.IPv4AddressNumberOfEntries parameter
 - Implement Device.DHCPv4.Server.Pool.{i}.Client.{i}.OptionNumberOfEntries parameter
2020-11-17 15:06:42 +01:00
Amin Ben Ramdhane
38bbb5e455 Ticket refs #2920: TR-181: Device.IP.Interface.{i}. IPv4Address, IPv6Address and IPv6Prefix multi-instance objects are treated as single-instance 2020-11-07 19:12:29 +01:00
Amin Ben Ramdhane
c395e8dd51 DHCPv4: fix SentOption segfault issue
- Device.DHCPv4.Client.{i}.SentOption.1.Enable : fix get/set segfault issue
- Device.DHCPv4.Client.{i}.SentOption.1.Tag : fix get/set segfault issue
- Device.DHCPv4.Client.{i}.SentOption.1.Value : fix get/set segfault issue
- Device.DHCPv4.Client.{i}.SentOption.: fix add/del segfault issue
2020-10-10 12:46:34 +01:00
Amin Ben Ramdhane
608bb009c9 DHCPv4: fix MaxAddress param value 2020-10-10 12:41:05 +01:00
Amin Ben Ramdhane
c6602debdd Revert "DHCPv4: fix segfault issue"
This reverts commit 893e27b7f9.
2020-10-10 12:35:42 +01:00
Amin Ben Ramdhane
893e27b7f9 DHCPv4: fix segfault issue
- Device.DHCPv4.Server.Pool.{i}.MaxAddress: fix its value
- Device.DHCPv4.Client.{i}.SentOption.1.Enable : fix get/set segfault issue
- Device.DHCPv4.Client.{i}.SentOption.1.Tag : fix get/set segfault issue
- Device.DHCPv4.Client.{i}.SentOption.1.Value : fix get/set segfault issue
- Device.DHCPv4.Client.{i}.ReqOption.: fix add/del segfault issue
2020-10-08 19:19:27 +01:00
Amin Ben Ramdhane
a8dc2edcfa WiFi: fix some issues
- Device.WiFi.Radio.1.SupportedStandards : fix its value
- Device.WiFi.EndPoint.1.WPS.ConfigMethodsEnabled : fix its set value
- Device.WiFi.EndPoint.1.WPS.PIN : fix its set value
- Device.WiFi.EndPoint. : fix segfault when calling delete_obj all
2020-10-08 19:19:18 +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
Amin Ben Ramdhane
f9d2c345f1 Ticket refs #2974: Referenced objects have trailing dot 2020-08-26 11:26:33 +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
Vivek Kumar Dutta
32f5cb92dd dmcommon: Update boolean validator 2020-07-16 11:38:09 +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
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
Amin Ben Ramdhane
e4f1fd8653 WiFi: fix get/set value of SupportedFrequencyBands and OperatingFrequencyBand parameters 2020-06-22 16:43:17 +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
Amin Ben Ramdhane
efe2ca135b Device.IP: fix the get/set of IPv4Capable and IPv6Capable parameters 2020-05-31 20:57:52 +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
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
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
f01badfef5 VLANTermination: fix some issues 2020-05-06 12:46:19 +01:00
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
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
fa92e8af22 Bridge object: source code improvement
*) remove unused function
*) add missing validation function
*) fix some issues
2020-03-27 21:13:10 +01:00