0002-fastd-update-to-v16.patch 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Thu, 8 Jan 2015 01:26:55 +0100
  3. Subject: fastd: update to v16
  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..5140029 100644
  60. --- a/net/fastd/Makefile
  61. +++ b/net/fastd/Makefile
  62. @@ -8,19 +8,24 @@
  63. include $(TOPDIR)/rules.mk
  64. PKG_NAME:=fastd
  65. -PKG_VERSION:=14
  66. -PKG_RELEASE:=1
  67. +PKG_VERSION:=16
  68. +PKG_RELEASE:=2
  69. PKG_MAINTAINER:=Matthias Schiffer <mschiffer@universe-factory.net>
  70. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  71. -PKG_SOURCE_URL:=https://projects.universe-factory.net/attachments/download/75
  72. -PKG_MD5SUM:=34f6bdebd0410a1fba7c8fd06fff7a05
  73. +PKG_SOURCE_URL:=https://projects.universe-factory.net/attachments/download/78
  74. +PKG_MD5SUM:=135b3083d2743e335738de3bd4bb0c3c
  75. +
  76. +PKG_LICENSE:=BSD-2-Clause
  77. +PKG_LICENSE_FILES:=COPYRIGHT
  78. PKG_CONFIG_DEPENDS:=\
  79. CONFIG_FASTD_ENABLE_METHOD_CIPHER_TEST \
  80. CONFIG_FASTD_ENABLE_METHOD_COMPOSED_GMAC \
  81. + CONFIG_FASTD_ENABLE_METHOD_COMPOSED_UMAC \
  82. CONFIG_FASTD_ENABLE_METHOD_GENERIC_GMAC \
  83. CONFIG_FASTD_ENABLE_METHOD_GENERIC_POLY1305 \
  84. + CONFIG_FASTD_ENABLE_METHOD_GENERIC_UMAC \
  85. CONFIG_FASTD_ENABLE_METHOD_NULL \
  86. CONFIG_FASTD_ENABLE_METHOD_XSALSA20_POLY1305 \
  87. CONFIG_FASTD_ENABLE_CIPHER_AES128_CTR \
  88. @@ -28,11 +33,13 @@ PKG_CONFIG_DEPENDS:=\
  89. CONFIG_FASTD_ENABLE_CIPHER_SALSA20 \
  90. CONFIG_FASTD_ENABLE_CIPHER_SALSA2012 \
  91. CONFIG_FASTD_ENABLE_MAC_GHASH \
  92. + CONFIG_FASTD_ENABLE_MAC_UHASH \
  93. CONFIG_FASTD_WITH_CMDLINE_USER \
  94. CONFIG_FASTD_WITH_CMDLINE_LOGGING \
  95. CONFIG_FASTD_WITH_CMDLINE_OPERATION \
  96. CONFIG_FASTD_WITH_CMDLINE_COMMANDS \
  97. - CONFIG_FASTD_WITH_VERIFY
  98. + CONFIG_FASTD_WITH_DYNAMIC_PEERS \
  99. + CONFIG_FASTD_WITH_STATUS_SOCKET
  100. PKG_BUILD_DEPENDS:=nacl libuecc
  101. @@ -43,7 +50,7 @@ include $(INCLUDE_DIR)/cmake.mk
  102. define Package/fastd
  103. SECTION:=net
  104. CATEGORY:=Network
  105. - DEPENDS:=+kmod-tun +librt +libpthread
  106. + DEPENDS:=+kmod-tun +librt +libpthread +FASTD_WITH_STATUS_SOCKET:libjson-c
  107. TITLE:=Fast and Secure Tunneling Daemon
  108. URL:=https://projects.universe-factory.net/projects/fastd
  109. SUBMENU:=VPN
  110. @@ -60,8 +67,10 @@ CMAKE_OPTIONS += \
  111. -DCMAKE_BUILD_TYPE:STRING=MINSIZEREL \
  112. -DWITH_METHOD_CIPHER_TEST:BOOL=FALSE \
  113. -DWITH_METHOD_COMPOSED_GMAC:BOOL=FALSE \
  114. + -DWITH_METHOD_COMPOSED_UMAC:BOOL=FALSE \
  115. -DWITH_METHOD_GENERIC_GMAC:BOOL=FALSE \
  116. -DWITH_METHOD_GENERIC_POLY1305:BOOL=FALSE \
  117. + -DWITH_METHOD_GENERIC_UMAC:BOOL=FALSE \
  118. -DWITH_METHOD_NULL:BOOL=FALSE \
  119. -DWITH_METHOD_XSALSA20_POLY1305:BOOL=FALSE \
  120. -DWITH_CIPHER_AES128_CTR:BOOL=FALSE \
  121. @@ -69,11 +78,13 @@ CMAKE_OPTIONS += \
  122. -DWITH_CIPHER_SALSA20:BOOL=FALSE \
  123. -DWITH_CIPHER_SALSA2012:BOOL=FALSE \
  124. -DWITH_MAC_GHASH:BOOL=FALSE \
  125. + -DWITH_MAC_UHASH:BOOL=FALSE \
  126. -DWITH_CMDLINE_USER:BOOL=FALSE \
  127. -DWITH_CMDLINE_LOGGING:BOOL=FALSE \
  128. -DWITH_CMDLINE_OPERATION:BOOL=FALSE \
  129. -DWITH_CMDLINE_COMMANDS:BOOL=FALSE \
  130. - -DWITH_VERIFY:BOOL=FALSE \
  131. + -DWITH_DYNAMIC_PEERS:BOOL=FALSE \
  132. + -DWITH_STATUS_SOCKET:BOOL=FALSE \
  133. -DWITH_CAPABILITIES:BOOL=FALSE \
  134. -DENABLE_SYSTEMD:BOOL=FALSE \
  135. -DENABLE_LIBSODIUM:BOOL=FALSE \
  136. @@ -88,6 +99,10 @@ ifeq ($(CONFIG_FASTD_ENABLE_METHOD_COMPOSED_GMAC),y)
  137. CMAKE_OPTIONS += -DWITH_METHOD_COMPOSED_GMAC:BOOL=TRUE
  138. endif
  139. +ifeq ($(CONFIG_FASTD_ENABLE_METHOD_COMPOSED_UMAC),y)
  140. +CMAKE_OPTIONS += -DWITH_METHOD_COMPOSED_UMAC:BOOL=TRUE
  141. +endif
  142. +
  143. ifeq ($(CONFIG_FASTD_ENABLE_METHOD_GENERIC_GMAC),y)
  144. CMAKE_OPTIONS += -DWITH_METHOD_GENERIC_GMAC:BOOL=TRUE
  145. endif
  146. @@ -96,6 +111,10 @@ ifeq ($(CONFIG_FASTD_ENABLE_METHOD_GENERIC_POLY1305),y)
  147. CMAKE_OPTIONS += -DWITH_METHOD_GENERIC_POLY1305:BOOL=TRUE
  148. endif
  149. +ifeq ($(CONFIG_FASTD_ENABLE_METHOD_GENERIC_UMAC),y)
  150. +CMAKE_OPTIONS += -DWITH_METHOD_GENERIC_UMAC:BOOL=TRUE
  151. +endif
  152. +
  153. ifeq ($(CONFIG_FASTD_ENABLE_METHOD_NULL),y)
  154. CMAKE_OPTIONS += -DWITH_METHOD_NULL:BOOL=TRUE
  155. endif
  156. @@ -126,6 +145,10 @@ ifeq ($(CONFIG_FASTD_ENABLE_MAC_GHASH),y)
  157. CMAKE_OPTIONS += -DWITH_MAC_GHASH:BOOL=TRUE
  158. endif
  159. +ifeq ($(CONFIG_FASTD_ENABLE_MAC_UHASH),y)
  160. +CMAKE_OPTIONS += -DWITH_MAC_UHASH:BOOL=TRUE
  161. +endif
  162. +
  163. ifeq ($(CONFIG_FASTD_WITH_CMDLINE_USER),y)
  164. CMAKE_OPTIONS += -DWITH_CMDLINE_USER:BOOL=TRUE
  165. @@ -143,8 +166,12 @@ ifeq ($(CONFIG_FASTD_WITH_CMDLINE_COMMANDS),y)
  166. CMAKE_OPTIONS += -DWITH_CMDLINE_COMMANDS:BOOL=TRUE
  167. endif
  168. -ifeq ($(CONFIG_FASTD_WITH_VERIFY),y)
  169. -CMAKE_OPTIONS += -DWITH_VERIFY:BOOL=TRUE
  170. +ifeq ($(CONFIG_FASTD_WITH_DYNAMIC_PEERS),y)
  171. +CMAKE_OPTIONS += -DWITH_DYNAMIC_PEERS:BOOL=TRUE
  172. +endif
  173. +
  174. +ifeq ($(CONFIG_FASTD_WITH_STATUS_SOCKET),y)
  175. +CMAKE_OPTIONS += -DWITH_STATUS_SOCKET:BOOL=TRUE
  176. endif
  177. @@ -161,9 +188,9 @@ define Package/fastd/install
  178. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fastd $(1)/usr/bin/
  179. $(INSTALL_DIR) $(1)/etc/init.d/
  180. - $(INSTALL_BIN) files/fastd.init $(1)/etc/init.d/fastd
  181. + $(INSTALL_BIN) $(PKG_BUILD_DIR)/doc/examples/openwrt/fastd.init $(1)/etc/init.d/fastd
  182. $(INSTALL_DIR) $(1)/etc/config
  183. - $(INSTALL_CONF) files/fastd.config $(1)/etc/config/fastd
  184. + $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/examples/openwrt/fastd.config $(1)/etc/config/fastd
  185. $(INSTALL_DIR) $(1)/etc/fastd
  186. $(INSTALL_DIR) $(1)/lib/upgrade/keep.d
  187. $(INSTALL_DATA) files/fastd.upgrade $(1)/lib/upgrade/keep.d/fastd