Commit graph

78 commits

Author SHA1 Message Date
Amin Ben Ramdhane
15e9323b71 Ticket refs#2494: libbbf: wrong handling of multiple bridging object handling 2020-05-01 18:39:04 +01:00
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
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
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
09048693c7 Ticket refs#2494: bbf: multiple bridging object handling 2020-04-26 13:17:26 +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
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
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
a1f7ce98cf Ticket refs #1254: Improvement validation parameters 2020-03-13 16:28:32 +01:00
Daniel Danzberger
43b4cff541 Don't define _XOPEN_SOURCE when compiling with _GNU_SOURCE
_XOPEN_SOURCE is included by _GNU_SOURCE.
This fixes redefinition errors of _XOPEN_SOURCE when the libc
implementations define it because of _GNU_SOURCE.

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2020-03-09 12:25:13 +01:00
Omar Kallel
5b0bc22622 Ticket Refs #1835: TR-181: Device.Security object 2020-03-03 15:30:08 +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
4ebedcf707 tr181: dhcpv4: fixes and improvements
- don't export symbols that are not used ouside of dhcpv4.c
- make read only values const
- remove uneceessary memory allocations and duplications
- avoid "router.network" calls for compatibitliy with generic openwrt builds
- move redundand code to functions
- remove tab indents on empty lines
- avoid opening and parsing DHCP_LEASE_FILE multiple times

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2020-02-19 11:53:48 +01:00
Daniel Danzberger
cda2d2a61c tr181: wifi: fix invalid SSID stats
There is not always an "ifname" option in the wifi-iface section.
This commit uses ubus to resolve the right interface for the SSID.

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2020-02-19 11:53:48 +01:00
Daniel Danzberger
b135d0b5ae Remove get_stats_from_ifconfig_command function
This function was only used to query interface statistics,
which are now read direclty from sysfs.

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2020-02-19 11:53:48 +01:00
Daniel Danzberger
3e903fc731 tr181: ethernet: Fixes and cleanups
- use sysfs instread of ubus and ifconfig command execution for Inteface stats.
  This reduces uneccessary memory and cpu overhead and speeds up the query time for
  IP.Interface queries by a multiple.

- move redundant code to static functions
- fix rx/tx multicast/broadcast stats can never be obtained from ifconfig
- fix invalid stats for unknownprotopackets.
- fix stats not correclty reported when counters exceed 32bit int values.

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2020-02-19 11:53:48 +01:00
Daniel Danzberger
219d9b4984 tr181: ip: Fixes and cleanups
- use sysfs instread of ubus and ifconfig command execution for Inteface stats.
  This reduces uneccessary memory and cpu overhead and speeds up the query time for
  IP.Interface queries by a multiple.

- move redundant code to static functions
- fix rx/tx multicast/broadcast stats can never be obtained from ifconfig
- fix invalid stats for unknownprotopackets.
- fix stats not correclty reported when counters exceed 32bit int values.

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2020-02-19 11:51:28 +01:00
Daniel Danzberger
994897a70d dmcommon.c: use const on read only value
Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2020-02-19 11:51:28 +01:00
Daniel Danzberger
345c466875 tr181: USB: Fixes and cleanups
- avoid uneccessary memory allocations
- move {read,write}FileContent functions to usb source file where they are used exclusively and make them static
- fix bad logic in readFileContent
- move redundant code to static functions
- fix get_USBUSBHostsHostDevice_MaxChildren never returning any value
- fix no interface instances being created
- make some functions that are not exported static
- fix segfault on get_USBInterface_Enable when the interface is down
- fix segfault on get_USBInterface_Status when the interface is down.
- fix segfault on missing format character in get_USBInterface_LowerLayers.
- fix segfault and double frees on recrusive browseUSBUSBHostsHostInst() calls.
- reduce overall memory usage
- use const on read-only values
- fix invalid comparision on strstr return value

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2020-02-19 11:51:28 +01:00
Daniel Danzberger
ddf03e43c7 Fix segfault when /etc/bbfm/[pkg] can't be created
Use unified function 'dmmap_file_path_get' and reuse it in
every function where the segfault occured.

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2020-02-19 11:51:28 +01:00
Jomily K Joseph
c0bb8e7f24 Revert "Layer2 Deployment : Changes done to support VLAN deployments for layer 2"
This reverts commit 1f3e1d8744
2020-02-19 06:04:37 +01:00
jjoseph
1f3e1d8744 Layer2 Deployment : Changes done to support VLAN deployments for layer 2
- Changes done in Bridging.Bridge.X.Port, Bridging.Bridge.X.VLAN Objects
- Changes done in IP.Interface Objects
- Changes done in Ethernet Objects

TODO : Few more deployments needs to be covered. Also to add supoort for
	VLANPort and VLANTermination.
2020-02-18 16:05:29 +05:30
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
Omar Kallel
dd91c79319 Ticket refs #1334: TR-181: Device.UPnP. object 2020-02-07 16:36:11 +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
Renamed from dmcommon.h (Browse further)