Age | Commit message (Collapse) | Author |
|
Ensure that the proper byte order is used when creating IPv4/IPv6/MAC
instances from integer values on big endian systems.
Fixes: #6678
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Force zeroing uninitialized memory.
Signed-off-by: Santiago Piccinini <spiccinini@altermundi.net>
|
|
Fixes: #3609
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Explicitly initialize the address scope value to zero in parse_cidr() and
L_setaddr() to avoid stray scope identifiers getting added when formatting
the address object as string.
Fixes: 1d2b4c777 ("luci-lib-ip: support scoped IPv6 addresses")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Ref: https://github.com/openwrt/luci/issues/3380
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: David Yang <mmyangfl@gmail.com>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Quirin Hofstaetter <qh@dev.tdt.de>
|
|
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
* Add luci.ip.cidr.is6mapped4() to test whether an IPv6 CIDR is a mapped IPv4 one
* Add luci.ip.cidr.mapped4() to derive IPv4 from mapped CIDR
* Remove mapped IPv4 workaround from constructor as it breaks genuine addrs like ::ffff:0
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
* Fix broken neighbor filtering by address range due to uninitialized memory
* Fix wrong sizeof in _cidr_add_sub when adding/substracing IPv6 addresses
* Properly convert numeric values to IPv6 addresses
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
If an ip6gre interface is queried, the resulting link local address string
of 47 byte overflowed the buffer of 32 bytes used to hold the translated
address.
Increase the address string buffer to 48 byte and check the address length
prior to writing it into the buffer to avoid future problems with longs
link local addresses.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
Add new luci.ip library which is an api compatible C reimplementation
of ip.lua. It also supports dumping the system routing table and neighbour
entry database via netlink.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|