0014-odhcp6c-add-option-sourcefilter-to-disable-source-filter.patch 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Sat, 18 Jul 2015 17:13:23 +0200
  3. Subject: odhcp6c: add option "sourcefilter" to disable source filter
  4. Signed-off-by: Steven Barth <steven@midlink.org>
  5. diff --git a/package/network/ipv6/odhcp6c/Makefile b/package/network/ipv6/odhcp6c/Makefile
  6. index 5bf43bd..75de54c 100644
  7. --- a/package/network/ipv6/odhcp6c/Makefile
  8. +++ b/package/network/ipv6/odhcp6c/Makefile
  9. @@ -8,7 +8,7 @@
  10. include $(TOPDIR)/rules.mk
  11. PKG_NAME:=odhcp6c
  12. -PKG_VERSION:=2015-07-13
  13. +PKG_VERSION:=2015-07-18
  14. PKG_RELEASE=$(PKG_SOURCE_VERSION)
  15. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  16. diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.script b/package/network/ipv6/odhcp6c/files/dhcpv6.script
  17. index b8cbddb..33f6d9b 100755
  18. --- a/package/network/ipv6/odhcp6c/files/dhcpv6.script
  19. +++ b/package/network/ipv6/odhcp6c/files/dhcpv6.script
  20. @@ -76,7 +76,7 @@ setup_interface () {
  21. done
  22. for entry in $RA_ROUTES; do
  23. - local duplicate=0
  24. + local duplicate=$NOSOURCEFILTER
  25. local addr="${entry%%/*}"
  26. entry="${entry#*/}"
  27. local mask="${entry%%,*}"
  28. diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.sh b/package/network/ipv6/odhcp6c/files/dhcpv6.sh
  29. index adcb100..4a453fd 100755
  30. --- a/package/network/ipv6/odhcp6c/files/dhcpv6.sh
  31. +++ b/package/network/ipv6/odhcp6c/files/dhcpv6.sh
  32. @@ -28,14 +28,15 @@ proto_dhcpv6_init_config() {
  33. proto_config_add_boolean delegate
  34. proto_config_add_int "soltimeout"
  35. proto_config_add_boolean fakeroutes
  36. + proto_config_add_boolean sourcefilter
  37. }
  38. proto_dhcpv6_setup() {
  39. local config="$1"
  40. local iface="$2"
  41. - local reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes
  42. - json_get_vars reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes
  43. + local reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter
  44. + json_get_vars reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter
  45. # Configure
  46. @@ -76,6 +77,7 @@ proto_dhcpv6_setup() {
  47. [ -n "$zone_464xlat" ] && proto_export "ZONE_464XLAT=$zone_464xlat"
  48. [ -n "$zone" ] && proto_export "ZONE=$zone"
  49. [ "$fakeroutes" != "0" ] && proto_export "FAKE_ROUTES=1"
  50. + [ "$sourcefilter" = "0" ] && proto_export "NOSOURCEFILTER=1"
  51. proto_export "INTERFACE=$config"
  52. proto_run_command "$config" odhcp6c \