Commit Graph

69 Commits (1634461bd208f4bd108ea5c3d3f1cf9eb56d4a7e)

Author SHA1 Message Date
pacien ef01c1d308 odhcp6c: add client fqdn and reconfigure options
Allowing DHCPV6_CLIENT_FQDN and DHCPV6_ACCEPT_RECONFIGURE to be turned off.
Defaulting to false, former behavior remains unchanged.

Signed-off-by: pacien <pacien.trangirard@pacien.net>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase]
6 years ago
Hans Dedecker 2e02fdb363 odhcp6c: apply IPv6/ND configuration earlier
Apply IPv6/ND configuration before proto_send_update so that all config info
is available when netifd is handling the notify_proto ubus call.
In particular this fixes an issue when netifd is updating the downstream IPv6 mtu
as netifd was still using the not yet updated upstream IPv6 mtu to set the
downstream IPv6 mtu

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years ago
Hans Dedecker def5b7f285 odhcp6c: add noserverunicast config option for broken DHCPv6 servers
Fix broken DHCPv6 servers which provide the server unicast option but
do not reply on DHCPv6 renew messages directed to the IPv6 address
contained in the server unicast option whihc results in broken IPv6
connectivity.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years ago
Hans Dedecker 327c711da4 odhcp6c: make ds-lite/map tunnel encapsulation limit support configurable (FS#1501)
Be compatible with ISPs which don't support the destination option header containing
the tunnel encapsulation limit as reported in FS#1501 for dynamic created ds-lite/map
interfaces.
Setting the uci parameter encaplimit_dslite/map to ignore; allows to disable the insertion
of the destination option header for the dynamic created ds-lite/map interface.
Otherwise the tunnel encapsulation limit value can be set to a value from 0 till 255
by setting the encaplimit_dslite/map uci parameter accordingly.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years ago
Hans Dedecker 1a5863d6d7 odhcp6c: rework sendopts handling
Bring logic of sendopts handling in line with ip6prefix handling

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years ago
Jo-Philipp Wich 66222dd92b odhcp6c: support multiple additional user prefixes
Support configuration in the form...

    list ip6prefix 2001:db8:1234::/64
    list ip6prefix 2001:db8:5678::/64

... to allow specifying multiple additional IPv6 prefixes.

Implements feature request FS#1361.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
6 years ago
Hans Dedecker 787326b43e odhcp6c: fix appending of emtpy sendopt value (FS#1336)
Don't append an empty sendopts value as odhcp6c bails out
immediately on an empty -x option triggering an infinite start
loop of odhcp6c

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years ago
Hans Dedecker d8acbb86a1 odhcp6c: change sendopts option into list
Commit a26045049b added support for sendopts as a string; since multiple
sendopts values can be specified it makes more sense to model it as a
list of strings.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years ago
Hans Dedecker cc7a005c1a odhcp6c: add defaultreqopts config option
By default odhcp6c asks for a default list of options; the config option
defaultreqopts allows to tweak this behavior.
When set to 0 odhcp6c will not ask for any options except for the options
specified in the reqopts config option.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years ago
Hans Dedecker 26045049ba odhcp6c: add sendopts config support and update to latest git HEAD
Add sendopts config support allowing to add options in sent DHCPv6 packets.

Options can be configured as follows :
	uci set network.wan6.sendopts="sntpservers:3001:3001::1,3001:3001::2 11:00000000000000000000006674692F 0x3e8:ABCDEF"

Based on a patch by Frank Andrieu <fandrieu@gmail.com>

See https://git.openwrt.org/?p=project/odhcp6c.git;a=commit;h=510aaf6d528210c5e8a6159f9b80b32615e88c5f
for a more detailed description.

Latest git changes :
	1f93bd4 dhcpv6: rework option passthrough logic
	a477e95 odhcp6c: rework userclass and vendorclass command handling
	510aaf6 odhcp6c: add -x opt:val support
	ab75be1 treewide: update copyrights to 2018
	f3a4609 odhcp6c: let odhcp6c_add_state return a success/failure indication

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years ago
Hans Dedecker 995193ccdb odhcp6c: add workaround for broken extendprefix scenario
Extendprefix is typically used to extend an IPv6 RA prefix from a mobile
wan link to the LAN; such scenario requires correct RA prefix settings
like the on link flag not being set.
However some mobile manufacter set the RA prefix on link flag which breaks
basic IPv6 routing.
Work around this issue by filtering out the route being equal to the
extended prefix.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years ago
Hans Dedecker 05c3647d35 odhcp6c: add ra_holdoff config option and update to git HEAD version (FS#964)
51733a6 ra: align RA update interval with RFC4861 (FS#964)

Add ra_holdoff config option which allows to configure the RA minimum
update interval which is by default 3 seconds as stated in RFC4861.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years ago
Hans Dedecker 1d45ec2784 dhcpv6: add missing dollar sign in dhcpv6 script (FS#874)
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>
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
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
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 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 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 09ad0ae4bd odhcp6c: silence fw3 warnings
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 45867
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 64aa0929b9 odhcp6c: Fix white space errors
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>

SVN-Revision: 45585
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 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 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 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 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 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 3ce83eb9a0 odhcp6c: export passthru options as netifd data
SVN-Revision: 40825
10 years ago
Steven Barth 0c06d76c79 netifd: Fix nested protocols going offline at reload + various route issues
Much thanks to Hans Dedecker

SVN-Revision: 40746
10 years ago
Steven Barth cc80c11538 odhcp6c: bring up nested interfaces on config change
SVN-Revision: 40745
10 years ago
Steven Barth 8c53f29220 odhcp6c: some more fixes for map / lw4o6 support
SVN-Revision: 40728
10 years ago
Steven Barth ef9f0fa232 odhcp6c: add preliminary support for MAP provisioning
SVN-Revision: 40604
10 years ago
Felix Fietkau 6d3672b13b odhcp6c: Add renew handler for proto dhcpv6
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>

SVN-Revision: 40386
10 years ago
Steven Barth a22190340a odhcp6c: add preliminary CER-ID support
SVN-Revision: 40351
10 years ago
Steven Barth 0555ebf66d 6rd / ds-lite: make the firewall-zones of nested-protocols configurable
SVN-Revision: 40020
10 years ago
Steven Barth 7ac0057c1f odhcp6c: pass on delegate-flag on to ds-lite interface
SVN-Revision: 39910
10 years ago
Steven Barth 97faa098a2 odhcp6c: readd userclass and vendorclass
SVN-Revision: 39628
10 years ago
John Crispin 0da7d381f0 odhcp6c: add validation rules to proto handler
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 39624
10 years ago
Steven Barth 3194834c55 odhcp6c: remove source-restriction from local routes again (broke relaying)
SVN-Revision: 39575
10 years ago
Steven Barth 05c9507cd3 odhcp6c: Add support for userclass and vendorclass
SVN-Revision: 39478
10 years ago