Fix multiple issues in StaticAddress implementation
- "StaticAddress.{i}.Yiaddr" accepting any IP address -> According to standard, It should accept IP address from DHCP IP pool
- Same IP address can be assigned to multiple MAC address -> According to standard, Once a IP got bind to a MAC, it should not get bind to other MAC
- Able to create multiple entry for same MAC -> According to standard, It should accept only one entry for one MAC
- Able to create multiple object with same Alias -> According to standard, Alias should be unique
- 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
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
- Move missing mcast functions from dmcommon file to mcast file
- Remove extern from function declarations
- Fix some indentation
- Comment unsupported parameters
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.
- 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.
_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>
- 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>
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>
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>
- 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>
- 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>
- 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>
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>
- 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.