Commit Graph

331 Commits (1634461bd208f4bd108ea5c3d3f1cf9eb56d4a7e)

Author SHA1 Message Date
Hans Dedecker 4d10030c3c odhcp6c: use LEDE_GIT in package source url
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years ago
Hans Dedecker 542feafd90 odhcp6c: update to git HEAD version
c13b6a0 dhcpv6: fix white space error
e9d80cc dhcpv6: trigger restart of DHCPv6 state machine when not
		receiving statefull options
c7122ec update README
419fb63 dhcpv6: server unicast option support

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years ago
Daniel Golle 1590b0fab0 6in4: add missing colon when setting default ca_path
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
7 years ago
Hans Dedecker d1daf3f38d map: take over maintainership
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Acked-by: Jo-Philipp Wich <jo@mein.io>
7 years ago
Hans Dedecker 0d49f9f4b4 odhcp6c: take over maintainership
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Acked-by: Jo-Philipp Wich <jo@mein.io>
7 years ago
Hans Dedecker bb8e9c51ab map: delete map-t device when tearing down map interface
Delete the map-t device when tearing down the map-t interface; as such
there's no conflict when the map-t interface comes up again when trying
to add the map-t device as the map-t device was still present
(Can not add: device 'map-wan6_4' already exists!).

Only call ifdown in teardown for map-e and lw6o4 map interfaces types
in order to suppress the trace "wan6_4 (6652): Interface wan6_4_ not found"

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years ago
Hans Dedecker 8d2171e469 odhcp6c: add option "keep_ra_dnslifetime"
Add option keep_ra_dnslifetime which will preserve the received
lifetime for RDNSS and DNSSL RA records and not overwrite it
by the RA router lifetime as specified in RFC6106.
This allows to accept RDNNS records from RAs that don't announce
a default route by setting router lifetime to 0 in the RAs.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years ago
Hans Dedecker 34fa03ea16 odhcp6c: bump to git HEAD version
5d6fec3 Merge pull request #50 from sartura/libubox_md5_reuse
33a2ba1 odhcp6c: reuse md5 from libubox

Switch PKG_SOURCE_URL to git.lede-project.org/project/odhcp6c.git

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years ago
Felix Fietkau c7c1cf5618 treewide: clean up and unify PKG_VERSION for git based downloads
Also use default defintions for PKG_SOURCE_SUBDIR, PKG_SOURCE

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 720b99215d treewide: clean up download hashes
Replace *MD5SUM with *HASH, replace MD5 hashes with SHA256

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Hans Dedecker 7d760284a7 odhcp6c: Pass parameters to user dhcpv6 script
Pass all the parameters like device, dhcpv6 state to user script

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
8 years ago
Florian Fainelli 44ac4adb34 map: Have cmake find libubus.h
Update CMakeList.txt to look for libubus.h since we depend on it.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
8 years ago
Alexandru Ardelean d0345c6bb6 network/ipv6/map: drop Build/Prepare rule in favor of default one
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
8 years ago
Alexandru Ardelean 8cf08b6783 network/ipv6/6rd: drop Build/Prepare rule in favor of default one
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
8 years ago
Daniel Engberg 9edfe7dd13 source: Switch to xz for packages and tools where possible
* Change git packages to xz
* Update mirror checksums in packages where they are used
* Change a few source tarballs to xz if available upstream
* Remove unused lines in packages we're touching, requested by jow- and blogic
* We're relying more on xz-utils so add official mirror as primary source, master site as secondary.
* Add SHA256 checksums to multiple git tarball packages

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
8 years ago
Hans Dedecker 34528c4807 dslite: Quote resolveip hostname argument
Quote resolveip hostname argument to avoid bad shell injections.
While at it fix pattern match logic in case multiple IPv6 addresses
are returned for a hostname as they're seperated by newline by
resolveip and not a white space

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
8 years ago
Jo-Philipp Wich 864b2d113a 6in4: fix invalid local variable declaration (FS#188)
Remove an invalid local variable declaration in the tunnel update subshell
invocation. Local declarations outside of function scopes are illegal since
the Busybox update to version 1.25.0 .

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Hans Dedecker ecbc138343 odhcp6c: Upstep to latest version
Following fixes are included in the latest version:
    -Script is launched with incorrect action
    -Possible buffer overflows
    -Lots of minor bugfixes

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
8 years ago
Jo-Philipp Wich 24a7ccb056 treewide: replace jow@openwrt.org with jo@mein.io
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
blogic ac7858a0f3 odhcp6c : Silence mtu write error warnings
Silence warning "daemon.notice netifd: wan6 (1139): sh: write error: Invalid argument"
when an invalid MTU is received via RA as kernel refuses to accept IPv6 mtu values
which are smaller than 1280 and bigger than the device mtu.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>

git-svn-id: svn+ssh://svn.openwrt.org/openwrt/trunk@49054 3c298f89-4303-0410-b956-a3cf2f4a3e73
8 years ago
Felix Fietkau 99856ebf5c 6in4: use uclient-fetch instead of wget/curl
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48391
8 years ago
Jo-Philipp Wich 939b944c6e Revert "6in4: Corrected tunnelbroker tunnel update URL"
The auth change appears to break the endpoint update for most users and with
my local tests the old update url works just fine.

This reverts commit 99c03a88cb6fed0519efdfaac305794653a12542.

SVN-Revision: 48384
8 years ago
Hauke Mehrtens f80cee1ce5 6in4: Corrected tunnelbroker tunnel update URL
Changed the tunnel update URL into format tunnelbrokers
example has, that made it work again. Current method gives "Username/Password
Authentication Failed." when I tried the wget line manually and logread
eventually says also "6in4: update failed". With corrected URL it works fine:
"good 111.222.333.444" or "nochg 111.222.333.444" and logread concurs with
success, and tunnel actually updates.

Tested-by: Vaasa Hacklab <info@vaasa.hacklab.fi>
Signed-off-by: Sami Olmari <sami@olmari.fi>

SVN-Revision: 48006
9 years ago
Steven Barth 8e9196d1cb 6in4: add tunlink option support
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 47189
9 years ago
Steven Barth 836d462b10 package: Remove dependencies to kmod-ipv6
Since r46834, IPv6 support is builtin if selected. Therefor, dependencies
on kmod-ipv6 can no longer be fulfilled, since it is not a module anymore.

Signed-off-by: Arjen de Korte <arjen+openwrt@de-korte.org>

SVN-Revision: 47022
9 years ago
Steven Barth 1b91cd2663 map: be less restrictive when matching lw4over6 prefixes
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 46819
9 years ago
Steven Barth 7af30b4cef map: ignore insignificant PSID bits
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 46804
9 years ago
Steven Barth 4b7ba93083 odhcp6c: correctly extend prefix from RAs
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 46781
9 years ago
Steven Barth 72b4ed113a odhcp6c: add RFC 7278 3gpp IPv6 prefix extension
Use option extendprefix 1 to enable

Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 46779
9 years ago
Steven Barth 7e009c1598 map: add debug-code for mapcalc
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 46763
9 years ago
Steven Barth 9a2132156d odhcp6c: minor fixes
Better synchronize RA & DHCPv6 events
Accumulate some events to avoid flooding
Restart softwires for address and prefix changes

Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 46518
9 years ago
Steven Barth 706adb1601 odhcp6c: add option "sourcefilter" to disable source filter
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 46408
9 years ago
Steven Barth a06c1c810e odhcp6c: fix some more compatibility issues
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 46335
9 years ago
Steven Barth fab6209f71 odhcp6c: work-around more ISP DHCPv6-PD issues
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 46317
9 years ago
Steven Barth 4734c4459b odhcp6c: work around RIOs matching PIOs as sent by some apple routers
Thanks to Mikael Abrahamsson for reporting.

Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 45941
9 years ago
Steven Barth 908b9065bb 6to4: Remove sourcerouting parameter registration
Commit 31214c38c8dd0f70366b523f9b0335145b9386bd removes IPv6 unneeded source-dest-routing workarounds;
as a result sourcerouting parameter is unused and can be removed.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>

SVN-Revision: 45940
9 years ago
Steven Barth 66f9d344b1 6rd: Remove sourcerouting parameter registration
Commit 31214c38c8dd0f70366b523f9b0335145b9386bd removes IPv6 unneeded source-dest-routing workarounds;
as a result sourcerouting parameter is unused and can be removed.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>

SVN-Revision: 45939
9 years ago
Steven Barth e23052ab74 map: add sleep work-around for lw4o6 race-condition
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 45936
9 years ago
Steven Barth 2fed0fffe1 odhcp6c: fix handling of custom DHCPv6 options
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 45935
9 years ago
Steven Barth 09ad0ae4bd odhcp6c: silence fw3 warnings
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 45867
9 years ago
Steven Barth a28470a3cc map: add support for lw4o6 address matching, minor optimizations
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 45770
9 years ago
Jonas Gorski 5caa23551e ds-lite: fix resolve retry for fqdn peeraddrs
If the first resolveip call will fail, peeraddr will be now empty, and
the subsequent resolveip call will try to resolve an empty string.

Fix this by storing the result in a temporary variable.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 45712
9 years ago
Steven Barth 08f057c703 ipv6: remove now unneeded source-dest-routing workarounds
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 45700
9 years ago
Steven Barth 1ffe824e81 map: set ealen to psidlen for lw4over6
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 45689
9 years ago
Steven Barth 356a9f0280 odhcp6c: fix parsing of LW4over6 parameters
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 45688
9 years ago
Steven Barth 58f7d9676b map: shorten autogenerated sub-interface names to account for limits
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 45590
9 years ago
Steven Barth 64aa0929b9 odhcp6c: Fix white space errors
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>

SVN-Revision: 45585
9 years ago
Steven Barth 42c75c690e odhcp6c: fix SOL_MAX_RT to match RFC 3315
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 45514
9 years ago
Steven Barth 6b062ad848 network: shorten names of generated interfaces
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 45476
9 years ago
Steven Barth f1119373f2 odhcp6c: silence "bad number" warnings
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 45449
9 years ago
Steven Barth 2eefcd1048 odhcp6c: avoid saving empty RA search domains
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 45448
9 years ago
Steven Barth 56573fdb0d odhcp6c: fix some issue discovered by scan-build
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 45429
9 years ago
Steven Barth 7e5bf40cac odhcpd: avoid illegal memory access in some corner cases
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 45428
9 years ago
Steven Barth 0dbbbda4bf odhcp6c: move IPv6 /proc config to userspace and sanitize
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 45358
9 years ago
Steven Barth 4b1257137c odhcp6c: add 464xlat integration, fix dslite integration
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 45323
9 years ago
Steven Barth d5a477cc38 ds-lite: add support for fqdn peeraddrs
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 45322
9 years ago
Steven Barth 4f00a51723 odhcp6c: some more code compliance
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 45191
9 years ago
Steven Barth bbe5dc48a2 odhcp6c: musl fixes (thanks Felix)
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 45146
9 years ago
Steven Barth 6c0d6a3cb3 odhcp6c: various small fixes
SVN-Revision: 45001
9 years ago
Steven Barth e151d05622 6rd: make host dependency more specific
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 44636
9 years ago
Steven Barth 853a1d4baf 6in4: make host dependency more specific
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 44635
9 years ago
Steven Barth 547ac60813 6rd: honor tunlink in host dependency
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 44541
9 years ago
Jo-Philipp Wich 7be42a71e1 6in4: fix update timeout
The recent rework of the 6in4 endpoint update broke the retry mechanism.
Rework the timeout handling and make the update status more verbose.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 44327
9 years ago
Jo-Philipp Wich 84c6ee610b 6in4: don't use /dev/stdout for wget calls
Busybox ash does not implement /dev/stdout, therfore any wget output
is written into a file /dev/stdout instead of onto the standard output.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 44301
9 years ago
John Crispin fd2689ecfc map: Fix white space errors
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>

SVN-Revision: 44246
9 years ago
Steven Barth 252bb0eeae map: export calculated ruleset to /tmp
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 43961
9 years ago
Steven Barth d73c382a73 map: ignore psid and psidlen if psidlen is 0
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 43946
9 years ago
Jo-Philipp Wich da9782f935 thc-ipv6: update to v2.7
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 43894
9 years ago
Steven Barth 89e3a8b3b5 odhcp6c: correctly handle renew-replies with short lease times
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 43592
10 years ago
Steven Barth 490a5ebe23 odhcp6c: avoid busylooping with strangely behaving dhcpv6 servers
Thanks to Dave Taht for debugging and thanks to Comcast for
shipping strangely behaving software so I can fix some corner cases.

Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 43415
10 years ago
Steven Barth d2e0fa517f odhcp6c: be less verbose by default, increase musl compatibility
SVN-Revision: 43294
10 years ago
Steven Barth c5b5e68879 6in4: detect curl and busybox wget
b52053b 6in4: https support for he.net tunnel api
introduced HTTPS support using wget.
The busybox version of wget, however, doesn't support the -V option,
thus poluting logfiles with a full invalid-parameter-output.
Redirect stderr to fix that.
As libcurl and curl support selecting the SSL library of your choice,
also add support for curl which is more commonly used on OpenWrt than
"real" wget which needs libopenssl.
Also make sure to respect SSL_CERT_DIR and increase timeouts.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>

SVN-Revision: 43228
10 years ago
John Crispin 74a3a77bcd license info - revert r43155
turns out that r43155 adds duplicate info.

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 43167
10 years ago
John Crispin c10d97484a Add more license tags with SPDX identifiers
Note, that licensing stuff is a nightmare: many packages does not clearly
state their licenses, and often multiple source files are simply copied
together - each with different licensing information in the file headers.

I tried hard to ensure, that the license information extracted into the OpenWRT's
makefiles fit the "spirit" of the packages, e.g. such small packages which
come without a dedicated source archive "inherites" the OpenWRT's own license
in my opinion.

However, I can not garantee that I always picked the correct information
and/or did not miss license information.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>

SVN-Revision: 43155
10 years ago
Steven Barth bec9d38fa4 Add a few SPDX tags
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 43151
10 years ago
Steven Barth 8f877ff42b 6in4: https support for he.net tunnel api
HE.net tunnel update API requests are now made via https if an
SSL-capable wget is installed.  Certificate validation is
conditionally enabled if the CA certs are available.

Signed-off-by: Andrew Skalski <askalski@gmail.com>

SVN-Revision: 43124
10 years ago
Steven Barth a0d9489e84 odhcp6c: avoid some unnecessary big mallocs
SVN-Revision: 43056
10 years ago
Steven Barth 1db4cb9c92 odhcp6c: fix parse errors with some dhcpv6 servers
SVN-Revision: 42869
10 years ago
Steven Barth ea0a01d7e2 odhcp6c: fix typo in last commit
SVN-Revision: 42852
10 years ago
Steven Barth c7a941cf02 odhcp6c: don't assign addresses or prefixes prematurely
SVN-Revision: 42850
10 years ago
Steven Barth 5fa47c3c04 odhcp6c: ensure signal-safety of signal handlers
SVN-Revision: 42841
10 years ago
Steven Barth 8691d75917 odhcp6c: add route-workaround for broken IPv6-ISPs
Some ISP seem to only do stateful DHCPv6 and not sending RAs.
This is technically broken because plain DHCPv6 doesn't carry routes.

We work around here by faking a default route to the DHCPv6 server
if we do not receive a useful RA from the ISP.

This workaround can be turned off with: option fakeroutes 0

Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 42803
10 years ago
Steven Barth 75572d0d31 6in4: Tos support
Tos support is added as a string parameter which can have the following values :
   -inherit (outer header inherits the tos value of the inner header)
   -hex value

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>

SVN-Revision: 42749
10 years ago
Steven Barth e7e54ef672 6to4: Tos support
Tos support is added as a string parameter which can have the following values :
   -inherit (outer header inherits the tos value of the inner header)
   -hex value

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>

SVN-Revision: 42748
10 years ago
Steven Barth e9d15da0da 6rd: Tos support
Tos support is added as a string parameter which can have the following values :
     -inherit (outer header inherits the tos value of the inner header)
     -hex value

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>

SVN-Revision: 42747
10 years ago
Steven Barth def69a96e9 map: fix portsets starting with 0 and use regular NAT for 1:1 MAP
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 42741
10 years ago
Steven Barth 36115321be odhcp6c: work around weird ISP RS behaviour
SVN-Revision: 42674
10 years ago
Steven Barth 75cbca0a40 odhcp6c: enable softwires support by default
SVN-Revision: 42274
10 years ago
Steven Barth 462023f45a odhcp6c: Fix white space typo in dhcpv6.script
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>

SVN-Revision: 41893
10 years ago
Felix Fietkau e7ece301fe odhcp6c: suppress fw3 warnings
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 41833
10 years ago
Steven Barth 9231df5665 softwires: redesign dhcp(v6) provisioning
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 41823
10 years ago
Steven Barth 683b622fcd odhcp6c: Send RS with source link-layer address if possible
SVN-Revision: 41778
10 years ago
Jo-Philipp Wich 42bc2c49ae 6in4: send password unhashed
The preferred he.net /nic/update endpoint expects the password or updatekey in
plain text and not as md5 sum, therfore remove the hashing operation from the
script.

This effectively renders the "updatekey" option redundant but we keep it around
for backwards compatibility. Both "option password" and "option updatekey" will
have end up in the "&password=" parameter of the update url and are passed through
unmodified.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 41358
10 years ago
Steven Barth 2ecdc86b4d map: add support for map-t if available
SVN-Revision: 41003
10 years ago
Steven Barth 54291b16e6 dhcpv6: set default solicit timeout back to 120s
This deliberatly breaks RFC 7083 since its not really user-friendly.

SVN-Revision: 41001
10 years ago
Steven Barth 299c2cd312 6relayd: superseded by odhcpd
SVN-Revision: 40893
10 years ago
Steven Barth cdbbe71199 odhcp6c: fix last commit
SVN-Revision: 40887
10 years ago
Steven Barth f8c12d4227 odhcp6c: improve passthrough filter
SVN-Revision: 40886
10 years ago
Jo-Philipp Wich 83ccc9a8f6 6in4: adjust update url (#16617)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 40876
10 years ago
Steven Barth c99065ffab odhcp6c: improve passthru filter
SVN-Revision: 40826
10 years ago