diff --git a/net/freeradius3/Makefile b/net/freeradius3/Makefile
index cf55b299..dbcdb1a9 100644
--- a/net/freeradius3/Makefile
+++ b/net/freeradius3/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=freeradius3
 PKG_VERSION:=release_3_0_11
-PKG_RELEASE:=2
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/FreeRADIUS/freeradius-server/archive
@@ -343,6 +343,150 @@ define Package/freeradius3-mod-realm/conffiles
 endef
 
 # SQL support has not been ported
+define Package/freeradius3-mod-sql
+  $(call Package/freeradius3/Default)
+  DEPENDS:=freeradius3
+  TITLE:=SQL Backend handling module
+endef
+
+define Package/freeradius3-mod-sql/conffiles
+/etc/freeradius3/mods-config/sql
+/etc/freeradius3/mods-config/sql/cui
+/etc/freeradius3/mods-config/sql/counter
+/etc/freeradius3/mods-config/sql/main
+/etc/freeradius3/sites-available/buffered-sql
+/etc/freeradius3/mods-available/sqlcounter
+/etc/freeradius3/mods-available/sql
+/etc/freeradius3/mods-available/abfab_psk_sql
+endef
+
+define Package/freeradius3-mod-sql-null
+  $(call Package/freeradius3/Default)
+  DEPENDS:=+freeradius3-mod-sql
+  TITLE:=NULL SQL Backend module
+endef
+
+define Package/freeradius3-mod-sql-mysql
+  $(call Package/freeradius3/Default)
+  DEPENDS:=+freeradius3-mod-sql-null +libmysqlclient-r
+  TITLE:=SQL MySQL Backend module
+endef
+
+define Package/freeradius3-mod-sql-mysql/conffiles
+/etc/freeradius3/mods-config/sql/cui/mysql
+/etc/freeradius3/mods-config/sql/cui/mysql/queries.conf
+/etc/freeradius3/mods-config/sql/cui/mysql/schema.sql
+/etc/freeradius3/mods-config/sql/counter/mysql
+/etc/freeradius3/mods-config/sql/counter/mysql/noresetcounter.conf
+/etc/freeradius3/mods-config/sql/counter/mysql/monthlycounter.conf
+/etc/freeradius3/mods-config/sql/counter/mysql/expire_on_login.conf
+/etc/freeradius3/mods-config/sql/counter/mysql/dailycounter.conf
+/etc/freeradius3/mods-config/sql/main/mysql
+/etc/freeradius3/mods-config/sql/main/mysql/queries.conf
+/etc/freeradius3/mods-config/sql/main/mysql/schema.sql
+/etc/freeradius3/mods-config/sql/main/mysql/extras
+/etc/freeradius3/mods-config/sql/main/mysql/extras/wimax
+/etc/freeradius3/mods-config/sql/main/mysql/extras/wimax/queries.conf
+/etc/freeradius3/mods-config/sql/main/mysql/extras/wimax/schema.sql
+/etc/freeradius3/mods-config/sql/main/mysql/setup.sql
+endef
+
+define Package/freeradius3-mod-sql-postgresql
+  $(call Package/freeradius3/Default)
+  DEPENDS:=+freeradius3-mod-sql-null +libpq
+  TITLE:=PostgreSQL Backend module
+endef
+
+define Package/freeradius3-mod-sql-postgresql/conffiles
+/etc/freeradius3/mods-available/sql
+/etc/freeradius3/mods-config/sql/cui/postgresql
+/etc/freeradius3/mods-config/sql/cui/postgresql/queries.conf
+/etc/freeradius3/mods-config/sql/cui/postgresql/schema.sql
+/etc/freeradius3/mods-config/sql/counter/postgresql
+/etc/freeradius3/mods-config/sql/counter/postgresql/noresetcounter.conf
+/etc/freeradius3/mods-config/sql/counter/postgresql/monthlycounter.conf
+/etc/freeradius3/mods-config/sql/counter/postgresql/expire_on_login.conf
+/etc/freeradius3/mods-config/sql/counter/postgresql/dailycounter.conf
+/etc/freeradius3/mods-config/sql/main/postgresql
+/etc/freeradius3/mods-config/sql/main/postgresql/queries.conf
+/etc/freeradius3/mods-config/sql/main/postgresql/schema.sql
+/etc/freeradius3/mods-config/sql/main/postgresql/extras
+/etc/freeradius3/mods-config/sql/main/postgresql/extras/cisco_h323_db_schema.sql
+/etc/freeradius3/mods-config/sql/main/postgresql/extras/update_radacct_group.sql
+/etc/freeradius3/mods-config/sql/main/postgresql/extras/voip-postpaid.conf
+/etc/freeradius3/mods-config/sql/main/postgresql/setup.sql
+endef
+
+define Package/freeradius3-mod-sql-sqlite
+  $(call Package/freeradius3/Default)
+  DEPENDS:=+freeradius3-mod-sql-null +libsqlite3
+  TITLE:=SQLite3 Backend module
+endef
+
+define Package/freeradius3-mod-sql-sqlite/conffiles
+/etc/freeradius3/mods-config/sql/cui/sqlite
+/etc/freeradius3/mods-config/sql/cui/sqlite/queries.conf
+/etc/freeradius3/mods-config/sql/cui/sqlite/schema.sql
+/etc/freeradius3/mods-config/sql/counter/sqlite
+/etc/freeradius3/mods-config/sql/counter/sqlite/noresetcounter.conf
+/etc/freeradius3/mods-config/sql/counter/sqlite/monthlycounter.conf
+/etc/freeradius3/mods-config/sql/counter/sqlite/expire_on_login.conf
+/etc/freeradius3/mods-config/sql/counter/sqlite/dailycounter.conf
+/etc/freeradius3/mods-config/sql/main/sqlite
+/etc/freeradius3/mods-config/sql/main/sqlite/queries.conf
+/etc/freeradius3/mods-config/sql/main/sqlite/schema.sql
+endef
+
+define Package/freeradius3-mod-sql-ippool
+  $(call Package/freeradius3/Default)
+  DEPENDS:=freeradius3-mod-sql
+  TITLE:=SQL IP Pool module
+endef
+
+define Package/freeradius3-mod-sql-ippool/conffiles
+/etc/freeradius3/mods-available/sqlippool
+/etc/freeradius3/mods-available/dhcp_sqlippool
+/etc/freeradius3/mods-config/sql/ippool
+/etc/freeradius3/mods-config/sql/ippool/oracle
+/etc/freeradius3/mods-config/sql/ippool/oracle/queries.conf
+/etc/freeradius3/mods-config/sql/ippool/oracle/procedures.sql
+/etc/freeradius3/mods-config/sql/ippool/oracle/schema.sql
+/etc/freeradius3/mods-config/sql/ippool/postgresql
+/etc/freeradius3/mods-config/sql/ippool/postgresql/queries.conf
+/etc/freeradius3/mods-config/sql/ippool/postgresql/schema.sql
+/etc/freeradius3/mods-config/sql/ippool/sqlite
+/etc/freeradius3/mods-config/sql/ippool/sqlite/queries.conf
+/etc/freeradius3/mods-config/sql/ippool/sqlite/schema.sql
+/etc/freeradius3/mods-config/sql/ippool/mysql
+/etc/freeradius3/mods-config/sql/ippool/mysql/queries.conf
+/etc/freeradius3/mods-config/sql/ippool/mysql/schema.sql
+/etc/freeradius3/mods-config/sql/ippool-dhcp
+/etc/freeradius3/mods-config/sql/ippool-dhcp/oracle
+/etc/freeradius3/mods-config/sql/ippool-dhcp/oracle/queries.conf
+/etc/freeradius3/mods-config/sql/ippool-dhcp/oracle/schema.sql
+/etc/freeradius3/mods-config/sql/ippool-dhcp/sqlite
+/etc/freeradius3/mods-config/sql/ippool-dhcp/sqlite/queries.conf
+/etc/freeradius3/mods-config/sql/ippool-dhcp/sqlite/schema.sql
+/etc/freeradius3/mods-config/sql/ippool-dhcp/mysql
+/etc/freeradius3/mods-config/sql/ippool-dhcp/mysql/queries.conf
+/etc/freeradius3/mods-config/sql/ippool-dhcp/mysql/schema.sql
+endef
+
+define Package/freeradius3-mod-dhcp
+  $(call Package/freeradius3/Default)
+  DEPENDS:=freeradius3 freeradius3-mod-expr freeradius3-common
+  TITLE:=Radius DHCP module
+endef
+
+define Package/freeradius3-mod-dhcp/conffiles
+/etc/freeradius3/mods-available/dhcp
+/etc/freeradius3/mods-enabled/dhcp
+/etc/freeradius3/mods-available/dhcp
+/etc/freeradius3/mods-enabled/dhcp
+/usr/share/freeradius3/dictionary.dhcp
+/usr/share/freeradius3/dictionary.freedhcp
+/usr/lib/freeradius3/proto_dhcp.so
+endef
 
 define Package/freeradius3-mod-radutmp
   $(call Package/freeradius3/Default)
@@ -402,7 +546,6 @@ CONFIGURE_ARGS+= \
 	--without-rlm_eap_tnc \
 	--without-rlm_example \
 	--without-rlm_idn \
-	--without-rlm_ippool \
 	--without-rlm_krb5 \
 	--without-rlm_opendirectory \
 	--without-rlm_pam \
@@ -414,19 +557,14 @@ CONFIGURE_ARGS+= \
 	--without-rlm_ruby \
 	--without-rlm_securid \
 	--without-rlm_smsotp \
-	--without-rlm_sql \
 	--without-rlm_sql_db2 \
 	--without-rlm_sql_firebird \
 	--without-rlm_sql_freetds \
 	--without-rlm_sql_iodbc \
-	--without-rlm_sql_mysql \
 	--without-rlm_sql_oracle \
-	--without-rlm_sql_postgresql \
-	--without-rlm_sql_sqlite \
 	--without-rlm_sql_unixodbc \
 	--without-rlm_sqlcounter \
 	--without-rlm_sqlhpwippool \
-	--without-rlm_sqlippool \
 	--without-rlm_unbound \
 	--without-rlm_yubikey \
 
@@ -438,6 +576,65 @@ PKG_DICTIONARIES:= \
 	microsoft \
 	wispr \
 
+CONFIGSQL=	0
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-sql-mysql),)
+  MYSQL_CONFIG_YESNO=	yes
+  CONFIGURE_ARGS+= \
+		--with-rlm_sql_mysql \
+		--with-rlm_sql_mysql-include-dir="$(STAGING_DIR)/usr/include" \
+		--with-rlm_sql_mysql-lib-dir="$(STAGING_DIR)/usr/lib"
+#  CONFIGURE_LIBS+= -lmysqlclient_r
+  CONFIGSQL=	1
+else
+  MYSQL_CONFIG_YESNO=	no
+  CONFIGURE_ARGS+= \
+		--without-rlm_sql_mysql
+endif
+
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-sql-postgresql),)
+  CONFIGURE_ARGS+= \
+		--with-rlm_sql_postgresql \
+		--with-rlm_sql_postgresql-include-dir="$(STAGING_DIR)/usr/include" \
+		--with-rlm_sql_postgresql-lib-dir="$(STAGING_DIR)/usr/lib"
+#  CONFIGURE_LIBS+= -lpq
+  CONFIGSQL=	1
+else
+  CONFIGURE_ARGS+= \
+		--without-rlm_sql_postgresql
+endif
+
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-sql-sqlite),)
+  CONFIGURE_ARGS+= \
+		--with-rlm_sql_sqlite \
+		--with-rlm_sql_sqlite-include-dir="$(STAGING_DIR)/usr/include" \
+		--with-rlm_sql_sqlite-lib-dir="$(STAGING_DIR)/usr/lib"
+#  CONFIGURE_LIBS+= -lsqlite
+  CONFIGSQL=	1
+else
+  CONFIGURE_ARGS+= \
+		--without-rlm_sql_sqlite
+endif
+
+ifeq ($(CONFIGSQL),1)
+  CONFIGURE_ARGS+= \
+		--with-rlm_sql \
+		--with-rlm_sql_null
+  ifneq ($(CONFIG_PACKAGE_freeradius3-mod-sql-ippool),)
+    CONFIGURE_ARGS+= \
+		  --with-rlm_sqlippool \
+		  --with-rlm_ippool
+  else
+    CONFIGURE_ARGS+= \
+		  --without-rlm_sqlippool \
+		  --without-rlm_ippool
+  endif
+else
+  CONFIGURE_ARGS+= \
+		--without-rlm_sql \ \
+		--without-rlm_sql_null \
+		--without-rlm_sqlippool
+endif
+
 ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-eap-peap),)
   CONFIGURE_ARGS+= \
 		--with-rlm_eap_peap \
@@ -491,7 +688,7 @@ endif
 CONFIGURE_VARS+= \
 	LDFLAGS="$$$$LDFLAGS" \
 	LIBS="$(CONFIGURE_LIBS)" \
-	MYSQL_CONFIG="no" \
+	MYSQL_CONFIG="$(MYSQL_CONFIG_YESNO)" \
 	ac_cv_lib_readline=no \
 	ax_cv_cc_builtin_choose_expr=yes \
 	ax_cv_cc_builtin_types_compatible_p=yes ax_cv_cc_builtin_bswap64=yes \
@@ -517,6 +714,7 @@ define Package/freeradius3-common/install
 	$(CP) $(PKG_INSTALL_DIR)/etc/freeradius3/dictionary $(1)/etc/freeradius3/ ; \
 	$(INSTALL_DIR) $(1)/usr/lib/freeradius3
 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/freeradius3/libfreeradius-{dhcp,eap,radius,server}.so $(1)/usr/lib/freeradius3
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/freeradius3/rlm_eap_*.so $(1)/usr/lib/freeradius3
 	$(INSTALL_DIR) $(1)/usr/share/freeradius3
 	$(CP) $(PKG_INSTALL_DIR)/usr/share/freeradius3/dictionary $(1)/usr/share/freeradius3/
 	$(SED) "s,^\(\$$$$INCLUDE\),#\1,g" $(1)/usr/share/freeradius3/dictionary
@@ -537,10 +735,6 @@ define Package/freeradius3/install
 	for f in accounting filter; do \
 		$(CP) $(PKG_INSTALL_DIR)/etc/freeradius3/policy.d/$$$${f} $(1)/etc/freeradius3/policy.d/ ; \
 	done
-	for f in default; do \
-		$(CP) $(PKG_INSTALL_DIR)/etc/freeradius3/sites-available/$$$${f} $(1)/etc/freeradius3/sites-available/ ; \
-		$(CP) $(PKG_INSTALL_DIR)/etc/freeradius3/sites-enabled/$$$${f} $(1)/etc/freeradius3/sites-enabled/ ; \
-	done
 
 	$(INSTALL_DIR) $(1)/usr/sbin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/radiusd $(1)/usr/sbin/
@@ -564,6 +758,18 @@ define Package/freeradius3-utils/install
 	done
 endef
 
+define Package/freeradius3-mod-sql-ippool/install
+	for f in null mysql postgresql sqlite; do \
+		$(CP) $(PKG_INSTALL_DIR)/usr/lib/freeradius3/$$$${f} $$(1)/usr/lib/freeradius3 ; \
+	done
+endef
+
+define Package/freeradius3-mod-sql/install
+	for f in null mysql postgresql sqlite; do \
+		$(CP) $(PKG_INSTALL_DIR)/usr/lib/freeradius3/$$$${f} $$(1)/usr/lib/freeradius3 ; \
+	done
+endef
+
 define BuildPlugin
   define Package/$(1)/install
 	[ -z "$(2)" ] || $(INSTALL_DIR) $$(1)/usr/lib/freeradius3
@@ -589,6 +795,7 @@ $(eval $(call BuildPlugin,freeradius3-mod-always,rlm_always,))
 $(eval $(call BuildPlugin,freeradius3-mod-attr-filter,rlm_attr_filter,))
 $(eval $(call BuildPlugin,freeradius3-mod-chap,rlm_chap,))
 $(eval $(call BuildPlugin,freeradius3-mod-detail,rlm_detail,))
+$(eval $(call BuildPlugin,freeradius3-mod-dhcp,rlm_dhcp,))
 $(eval $(call BuildPlugin,freeradius3-mod-digest,rlm_digest,))
 $(eval $(call BuildPlugin,freeradius3-mod-eap-gtc,rlm_eap_gtc,))
 $(eval $(call BuildPlugin,freeradius3-mod-eap-leap,rlm_eap_leap,))
@@ -609,6 +816,12 @@ $(eval $(call BuildPlugin,freeradius3-mod-pap,rlm_pap,))
 $(eval $(call BuildPlugin,freeradius3-mod-passwd,rlm_passwd,))
 $(eval $(call BuildPlugin,freeradius3-mod-preprocess,rlm_preprocess,))
 $(eval $(call BuildPlugin,freeradius3-mod-radutmp,rlm_radutmp,))
+$(eval $(call BuildPlugin,freeradius3-mod-sql,rlm_sql,))
+$(eval $(call BuildPlugin,freeradius3-mod-sql-null,rlm_sql_null,))
+$(eval $(call BuildPlugin,freeradius3-mod-sql-mysql,rlm_sql_mysql,))
+$(eval $(call BuildPlugin,freeradius3-mod-sql-postgresql,rlm_sql_postgresql,))
+$(eval $(call BuildPlugin,freeradius3-mod-sql-sqlite,rlm_sql_sqlite,))
+$(eval $(call BuildPlugin,freeradius3-mod-sql-ippool,rlm_sqlippool,))
 $(eval $(call BuildPlugin,freeradius3-mod-realm,rlm_realm,))
 $(eval $(call BuildPlugin,freeradius3-mod-unix,rlm_unix,))
 $(eval $(call BuildPackage,freeradius3-utils))
