Nick Hainke e974acaac7 owipcalc: fix contains not respect default route
In IPv4 the default route can be written as
 0.0.0.0/0

In IPv6 the default route can be written as
 ::/0

If u try
  owipcalc 0.0.0.0/0 contains 1.1.1.1
or
  owipcalc ::/0 contains ::1
owipcalc will respond with 0 meaning that the "default prefixes" do not
contain the routes.
That is why we check now for 0 prefix.

Furthermore, if the prefix is 0, i will be 16. We will access a negative
array entry in the line:
 uint8_t net1 = x->s6_addr[15-i] & m;

Divide by % 16 to prevent i becoming 16:
 uint8_t i = ((128 - a->prefix) / 8) % 16;

Signed-off-by: Nick Hainke <vincent@systemli.org>
2021-01-23 17:48:18 +01:00
2020-12-30 14:38:43 -10:00
2021-01-20 08:18:28 +02:00
2021-01-09 17:08:31 -08:00
2021-01-22 13:26:11 +01:00
2021-01-18 23:49:55 +01:00
2021-01-11 15:06:21 -08:00
2021-01-23 20:05:19 +09:00
2020-06-19 21:16:52 +02:00
2014-06-16 08:14:04 +02:00
2020-05-24 14:50:30 -07:00

OpenWrt packages feed

Description

This is the OpenWrt "packages"-feed containing community-maintained build scripts, options and patches for applications, modules and libraries used within OpenWrt.

Installation of pre-built packages is handled directly by the opkg utility within your running OpenWrt system or by using the OpenWrt SDK on a build system.

Usage

This repository is intended to be layered on-top of an OpenWrt buildroot. If you do not have an OpenWrt buildroot installed, see the documentation at: OpenWrt Buildroot Installation on the OpenWrt support site.

This feed is enabled by default. To install all its package definitions, run:

./scripts/feeds update packages
./scripts/feeds install -a -p packages

License

See LICENSE file.

Package Guidelines

See CONTRIBUTING.md file.

Description
Community maintained packages for OpenWrt. Documentation for submitting pull requests is in CONTRIBUTING.md
Readme GPL-2.0 170 MiB
Languages
Makefile 54.5%
Shell 31.4%
C 8.1%
C++ 1.9%
Lua 1.4%
Other 2.5%