0003-fastd-update-to-v17.patch 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Thu, 29 Jan 2015 07:48:03 +0100
  3. Subject: fastd: update to v17
  4. diff --git a/net/fastd/Config.in b/net/fastd/Config.in
  5. index ca4045c..5820b97 100644
  6. --- a/net/fastd/Config.in
  7. +++ b/net/fastd/Config.in
  8. @@ -11,6 +11,11 @@ config FASTD_ENABLE_METHOD_COMPOSED_GMAC
  9. depends on PACKAGE_fastd
  10. default y
  11. +config FASTD_ENABLE_METHOD_COMPOSED_UMAC
  12. + bool "Enable composed-umac method provider"
  13. + depends on PACKAGE_fastd
  14. + default y
  15. +
  16. config FASTD_ENABLE_METHOD_GENERIC_GMAC
  17. bool "Enable generic-gmac method provider"
  18. depends on PACKAGE_fastd
  19. @@ -21,6 +26,11 @@ config FASTD_ENABLE_METHOD_GENERIC_POLY1305
  20. depends on PACKAGE_fastd
  21. default n
  22. +config FASTD_ENABLE_METHOD_GENERIC_UMAC
  23. + bool "Enable generic-umac method provider"
  24. + depends on PACKAGE_fastd
  25. + default y
  26. +
  27. config FASTD_ENABLE_METHOD_NULL
  28. bool "Enable null method"
  29. depends on PACKAGE_fastd
  30. @@ -58,6 +68,11 @@ config FASTD_ENABLE_MAC_GHASH
  31. depends on PACKAGE_fastd
  32. default y
  33. +config FASTD_ENABLE_MAC_UHASH
  34. + bool "Enable the UHASH message authentication code"
  35. + depends on PACKAGE_fastd
  36. + default y
  37. +
  38. config FASTD_WITH_CMDLINE_USER
  39. bool "Include support for setting user/group related options on the command line"
  40. @@ -79,9 +94,15 @@ config FASTD_WITH_CMDLINE_COMMANDS
  41. depends on PACKAGE_fastd
  42. default n
  43. -config FASTD_WITH_VERIFY
  44. - bool "Include support for on-verify handlers"
  45. - depends on PACKAGE_fastd
  46. - default n
  47. +config FASTD_WITH_DYNAMIC_PEERS
  48. + bool "Include support for on-verify handlers"
  49. + depends on PACKAGE_fastd
  50. + default n
  51. +
  52. +config FASTD_WITH_STATUS_SOCKET
  53. + bool "Include support for status sockets"
  54. + depends on PACKAGE_fastd
  55. + default y
  56. +
  57. endmenu
  58. diff --git a/net/fastd/Makefile b/net/fastd/Makefile
  59. index 0629cd7..027f549 100644
  60. --- a/net/fastd/Makefile
  61. +++ b/net/fastd/Makefile
  62. @@ -1,5 +1,5 @@
  63. #
  64. -# Copyright (C) 2012-2014 OpenWrt.org
  65. +# Copyright (C) 2012-2015 OpenWrt.org
  66. #
  67. # This is free software, licensed under the GNU General Public License v2.
  68. # See /LICENSE for more information.
  69. @@ -8,19 +8,24 @@
  70. include $(TOPDIR)/rules.mk
  71. PKG_NAME:=fastd
  72. -PKG_VERSION:=14
  73. +PKG_VERSION:=17
  74. PKG_RELEASE:=1
  75. PKG_MAINTAINER:=Matthias Schiffer <mschiffer@universe-factory.net>
  76. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  77. -PKG_SOURCE_URL:=https://projects.universe-factory.net/attachments/download/75
  78. -PKG_MD5SUM:=34f6bdebd0410a1fba7c8fd06fff7a05
  79. +PKG_SOURCE_URL:=https://projects.universe-factory.net/attachments/download/81
  80. +PKG_MD5SUM:=bad4f1948702f418b799578f83a0edb8
  81. +
  82. +PKG_LICENSE:=BSD-2-Clause
  83. +PKG_LICENSE_FILES:=COPYRIGHT
  84. PKG_CONFIG_DEPENDS:=\
  85. CONFIG_FASTD_ENABLE_METHOD_CIPHER_TEST \
  86. CONFIG_FASTD_ENABLE_METHOD_COMPOSED_GMAC \
  87. + CONFIG_FASTD_ENABLE_METHOD_COMPOSED_UMAC \
  88. CONFIG_FASTD_ENABLE_METHOD_GENERIC_GMAC \
  89. CONFIG_FASTD_ENABLE_METHOD_GENERIC_POLY1305 \
  90. + CONFIG_FASTD_ENABLE_METHOD_GENERIC_UMAC \
  91. CONFIG_FASTD_ENABLE_METHOD_NULL \
  92. CONFIG_FASTD_ENABLE_METHOD_XSALSA20_POLY1305 \
  93. CONFIG_FASTD_ENABLE_CIPHER_AES128_CTR \
  94. @@ -28,11 +33,13 @@ PKG_CONFIG_DEPENDS:=\
  95. CONFIG_FASTD_ENABLE_CIPHER_SALSA20 \
  96. CONFIG_FASTD_ENABLE_CIPHER_SALSA2012 \
  97. CONFIG_FASTD_ENABLE_MAC_GHASH \
  98. + CONFIG_FASTD_ENABLE_MAC_UHASH \
  99. CONFIG_FASTD_WITH_CMDLINE_USER \
  100. CONFIG_FASTD_WITH_CMDLINE_LOGGING \
  101. CONFIG_FASTD_WITH_CMDLINE_OPERATION \
  102. CONFIG_FASTD_WITH_CMDLINE_COMMANDS \
  103. - CONFIG_FASTD_WITH_VERIFY
  104. + CONFIG_FASTD_WITH_DYNAMIC_PEERS \
  105. + CONFIG_FASTD_WITH_STATUS_SOCKET
  106. PKG_BUILD_DEPENDS:=nacl libuecc
  107. @@ -43,7 +50,7 @@ include $(INCLUDE_DIR)/cmake.mk
  108. define Package/fastd
  109. SECTION:=net
  110. CATEGORY:=Network
  111. - DEPENDS:=+kmod-tun +librt +libpthread
  112. + DEPENDS:=+kmod-tun +librt +libpthread +FASTD_WITH_STATUS_SOCKET:libjson-c
  113. TITLE:=Fast and Secure Tunneling Daemon
  114. URL:=https://projects.universe-factory.net/projects/fastd
  115. SUBMENU:=VPN
  116. @@ -60,8 +67,10 @@ CMAKE_OPTIONS += \
  117. -DCMAKE_BUILD_TYPE:STRING=MINSIZEREL \
  118. -DWITH_METHOD_CIPHER_TEST:BOOL=FALSE \
  119. -DWITH_METHOD_COMPOSED_GMAC:BOOL=FALSE \
  120. + -DWITH_METHOD_COMPOSED_UMAC:BOOL=FALSE \
  121. -DWITH_METHOD_GENERIC_GMAC:BOOL=FALSE \
  122. -DWITH_METHOD_GENERIC_POLY1305:BOOL=FALSE \
  123. + -DWITH_METHOD_GENERIC_UMAC:BOOL=FALSE \
  124. -DWITH_METHOD_NULL:BOOL=FALSE \
  125. -DWITH_METHOD_XSALSA20_POLY1305:BOOL=FALSE \
  126. -DWITH_CIPHER_AES128_CTR:BOOL=FALSE \
  127. @@ -69,11 +78,13 @@ CMAKE_OPTIONS += \
  128. -DWITH_CIPHER_SALSA20:BOOL=FALSE \
  129. -DWITH_CIPHER_SALSA2012:BOOL=FALSE \
  130. -DWITH_MAC_GHASH:BOOL=FALSE \
  131. + -DWITH_MAC_UHASH:BOOL=FALSE \
  132. -DWITH_CMDLINE_USER:BOOL=FALSE \
  133. -DWITH_CMDLINE_LOGGING:BOOL=FALSE \
  134. -DWITH_CMDLINE_OPERATION:BOOL=FALSE \
  135. -DWITH_CMDLINE_COMMANDS:BOOL=FALSE \
  136. - -DWITH_VERIFY:BOOL=FALSE \
  137. + -DWITH_DYNAMIC_PEERS:BOOL=FALSE \
  138. + -DWITH_STATUS_SOCKET:BOOL=FALSE \
  139. -DWITH_CAPABILITIES:BOOL=FALSE \
  140. -DENABLE_SYSTEMD:BOOL=FALSE \
  141. -DENABLE_LIBSODIUM:BOOL=FALSE \
  142. @@ -88,6 +99,10 @@ ifeq ($(CONFIG_FASTD_ENABLE_METHOD_COMPOSED_GMAC),y)
  143. CMAKE_OPTIONS += -DWITH_METHOD_COMPOSED_GMAC:BOOL=TRUE
  144. endif
  145. +ifeq ($(CONFIG_FASTD_ENABLE_METHOD_COMPOSED_UMAC),y)
  146. +CMAKE_OPTIONS += -DWITH_METHOD_COMPOSED_UMAC:BOOL=TRUE
  147. +endif
  148. +
  149. ifeq ($(CONFIG_FASTD_ENABLE_METHOD_GENERIC_GMAC),y)
  150. CMAKE_OPTIONS += -DWITH_METHOD_GENERIC_GMAC:BOOL=TRUE
  151. endif
  152. @@ -96,6 +111,10 @@ ifeq ($(CONFIG_FASTD_ENABLE_METHOD_GENERIC_POLY1305),y)
  153. CMAKE_OPTIONS += -DWITH_METHOD_GENERIC_POLY1305:BOOL=TRUE
  154. endif
  155. +ifeq ($(CONFIG_FASTD_ENABLE_METHOD_GENERIC_UMAC),y)
  156. +CMAKE_OPTIONS += -DWITH_METHOD_GENERIC_UMAC:BOOL=TRUE
  157. +endif
  158. +
  159. ifeq ($(CONFIG_FASTD_ENABLE_METHOD_NULL),y)
  160. CMAKE_OPTIONS += -DWITH_METHOD_NULL:BOOL=TRUE
  161. endif
  162. @@ -126,6 +145,10 @@ ifeq ($(CONFIG_FASTD_ENABLE_MAC_GHASH),y)
  163. CMAKE_OPTIONS += -DWITH_MAC_GHASH:BOOL=TRUE
  164. endif
  165. +ifeq ($(CONFIG_FASTD_ENABLE_MAC_UHASH),y)
  166. +CMAKE_OPTIONS += -DWITH_MAC_UHASH:BOOL=TRUE
  167. +endif
  168. +
  169. ifeq ($(CONFIG_FASTD_WITH_CMDLINE_USER),y)
  170. CMAKE_OPTIONS += -DWITH_CMDLINE_USER:BOOL=TRUE
  171. @@ -143,8 +166,12 @@ ifeq ($(CONFIG_FASTD_WITH_CMDLINE_COMMANDS),y)
  172. CMAKE_OPTIONS += -DWITH_CMDLINE_COMMANDS:BOOL=TRUE
  173. endif
  174. -ifeq ($(CONFIG_FASTD_WITH_VERIFY),y)
  175. -CMAKE_OPTIONS += -DWITH_VERIFY:BOOL=TRUE
  176. +ifeq ($(CONFIG_FASTD_WITH_DYNAMIC_PEERS),y)
  177. +CMAKE_OPTIONS += -DWITH_DYNAMIC_PEERS:BOOL=TRUE
  178. +endif
  179. +
  180. +ifeq ($(CONFIG_FASTD_WITH_STATUS_SOCKET),y)
  181. +CMAKE_OPTIONS += -DWITH_STATUS_SOCKET:BOOL=TRUE
  182. endif
  183. @@ -161,9 +188,9 @@ define Package/fastd/install
  184. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fastd $(1)/usr/bin/
  185. $(INSTALL_DIR) $(1)/etc/init.d/
  186. - $(INSTALL_BIN) files/fastd.init $(1)/etc/init.d/fastd
  187. + $(INSTALL_BIN) $(PKG_BUILD_DIR)/doc/examples/openwrt/fastd.init $(1)/etc/init.d/fastd
  188. $(INSTALL_DIR) $(1)/etc/config
  189. - $(INSTALL_CONF) files/fastd.config $(1)/etc/config/fastd
  190. + $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/examples/openwrt/fastd.config $(1)/etc/config/fastd
  191. $(INSTALL_DIR) $(1)/etc/fastd
  192. $(INSTALL_DIR) $(1)/lib/upgrade/keep.d
  193. $(INSTALL_DATA) files/fastd.upgrade $(1)/lib/upgrade/keep.d/fastd