0023-odhcp6c-minor-fixes.patch 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. From: Nils Schneider <nils@nilsschneider.net>
  2. Date: Thu, 3 Sep 2015 18:07:17 +0200
  3. Subject: odhcp6c: minor fixes
  4. Better synchronize RA & DHCPv6 events
  5. Accumulate some events to avoid flooding
  6. Restart softwires for address and prefix changes
  7. Signed-off-by: Steven Barth <steven@midlink.org>
  8. diff --git a/package/network/ipv6/odhcp6c/Makefile b/package/network/ipv6/odhcp6c/Makefile
  9. index 75de54c..aa81e02 100644
  10. --- a/package/network/ipv6/odhcp6c/Makefile
  11. +++ b/package/network/ipv6/odhcp6c/Makefile
  12. @@ -8,14 +8,14 @@
  13. include $(TOPDIR)/rules.mk
  14. PKG_NAME:=odhcp6c
  15. -PKG_VERSION:=2015-07-18
  16. +PKG_VERSION:=2015-07-29
  17. PKG_RELEASE=$(PKG_SOURCE_VERSION)
  18. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  19. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  20. PKG_SOURCE_URL:=https://github.com/sbyx/odhcp6c.git
  21. PKG_SOURCE_PROTO:=git
  22. -PKG_SOURCE_VERSION:=024525798c5f6aba3af9b2ef7b3af2f3c14f1db8
  23. +PKG_SOURCE_VERSION:=dc186d6d2b0dd4ad23ca5fc69c00e81f796ff6d9
  24. PKG_MAINTAINER:=Steven Barth <steven@midlink.org>
  25. PKG_LICENSE:=GPL-2.0
  26. diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.script b/package/network/ipv6/odhcp6c/files/dhcpv6.script
  27. index 33f6d9b..677d35f 100755
  28. --- a/package/network/ipv6/odhcp6c/files/dhcpv6.script
  29. +++ b/package/network/ipv6/odhcp6c/files/dhcpv6.script
  30. @@ -5,6 +5,8 @@
  31. setup_interface () {
  32. local device="$1"
  33. + local prefsig=""
  34. + local addrsig=""
  35. proto_init_update "*" 1
  36. # Merge RA-DNS
  37. @@ -34,6 +36,7 @@ setup_interface () {
  38. for prefix in $PREFIXES; do
  39. proto_add_ipv6_prefix "$prefix"
  40. + prefsig="$prefsig ${prefix%%,*}"
  41. local entry="${prefix#*/}"
  42. entry="${entry#*,}"
  43. entry="${entry#*,}"
  44. @@ -68,6 +71,7 @@ setup_interface () {
  45. local valid="${entry%%,*}"
  46. proto_add_ipv6_address "$addr" "$mask" "$preferred" "$valid" 1
  47. + addrsig="$addrsig $addr/$mask"
  48. if [ -z "$RA_ADDRESSES" -a -z "$RA_ROUTES" -a \
  49. -z "$RA_DNS" -a "$FAKE_ROUTES" = 1 ]; then
  50. @@ -136,6 +140,8 @@ setup_interface () {
  51. json_add_string ifname "@$INTERFACE"
  52. json_add_string proto map
  53. json_add_string type "$MAPTYPE"
  54. + json_add_string _prefsig "$prefsig"
  55. + [ "$MAPTYPE" = lw4o6 ] && json_add_string _addrsig "$addrsig"
  56. json_add_string rule "$MAPRULE"
  57. json_add_string tunlink "$INTERFACE"
  58. [ -n "$ZONE_MAP" ] || ZONE_MAP=$ZONE
  59. @@ -163,6 +169,7 @@ setup_interface () {
  60. json_add_string ifname "@$INTERFACE"
  61. json_add_string proto "464xlat"
  62. json_add_string tunlink "$INTERFACE"
  63. + json_add_string _addrsig "$addrsig"
  64. [ -n "$ZONE_464XLAT" ] || ZONE_464XLAT=$ZONE
  65. [ -n "$ZONE_464XLAT" ] && json_add_string zone "$ZONE_464XLAT"
  66. [ -n "$IFACE_464XLAT_DELEGATE" ] && json_add_boolean delegate "$IFACE_464XLAT_DELEGATE"