Commit Graph

6 Commits

Author SHA1 Message Date
Adrian Schmutzler 858930547b treewide: use SPDX license identifiers
The SPDX license identifier provides a standardized way for specifying
licenses that is both human- and machine-readable. It is used upstream
both in OpenWrt and the Linux kernel.

Replace licenses in our repository by those identifiers.

The full-text licenses corresponding to these identifiers are
provided in the LICENSES folder.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Fabian Bläse <fabian@blaese.de>
2021-03-06 18:53:26 +01:00
Adrian Schmutzler 0092713196 treewide: replace IP string manipulation by owipcalc tool
The owipcalc tool provides an "add" algorithm which can be used
to concateneted IPv6 addresses from prefix and suffix.

Since it's available upstream and our string manipulation is ugly,
let's replace our IP concatenation with that tool. The package
consists of a single .c file with about 1000 lines resulting in
about 4 kB for the ipk package.

This patch does _not_ introduce any conceptual changes yet. Thus,
the "wrong" IPv6 prefix from KeyXchange will be expected in the
same format, it is just healed for the new code for now.

The change allows to get rid of some bloat, i.e. some quite trivial
custom functions on the way. This also drops the ipTidyColon()
function, as owipcalc seems to return the collapsed version by default.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-01-27 19:44:07 +01:00
Robert Langhammer 18e4263c6a Remove unusual shebang in files to be sourced.
Fixes: #101

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-09-17 12:38:38 +02:00
Adrian Schmutzler 6ad42be496 fff-network/fff-hoods: Only use MAC address in network lib
Previously, IPv6 addresses were constructed by reading from
the device config file in the function. To have more options,
it is better to use the address itself as parameter.

By this way we can decide what we use for getting the MAC when
calling.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2018-01-20 14:47:58 +01:00
Fabian Bläse 078bb80a53 fff-network: Get MAC from wifi device instead of wifi network
Using wifi devices makes it possible to get mac address
without having to configure wifi networks.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Tested-By: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
- Increment package version
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
2017-11-12 18:02:32 +01:00
Adrian Schmutzler 566d762148 fff-network/fff-hoods: Create functions for IPv6 rewriting
This puts the code for creating IPv6 addresses from MAC
address and EUI into functions, so it can be reused.

This should be particularly helpful if code is rewritten later.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-11-03 09:30:14 +01:00