Merge Official Source

This commit is contained in:
CN_SZTL 2020-04-05 21:13:52 +08:00
commit 4371baf6e8
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
12 changed files with 155 additions and 45 deletions

View File

@ -1149,12 +1149,15 @@ define KernelPackage/mlx4-core
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Mellanox ConnectX(R) mlx4 core Network Driver
DEPENDS:=@PCI_SUPPORT +kmod-ptp
FILES:=$(LINUX_DIR)/drivers/net/ethernet/mellanox/mlx4/mlx4_core.ko
FILES:= \
$(LINUX_DIR)/drivers/net/ethernet/mellanox/mlx4/mlx4_core.ko \
$(LINUX_DIR)/drivers/net/ethernet/mellanox/mlx4/mlx4_en.ko
KCONFIG:= CONFIG_MLX4_EN \
CONFIG_MLX4_EN_DCB=n \
CONFIG_MLX4_CORE=y \
CONFIG_MLX4_CORE_GEN2=y \
CONFIG_MLX4_DEBUG=n
AUTOLOAD:=$(call AutoProbe,mlx4_core)
AUTOLOAD:=$(call AutoProbe,mlx4_core mlx4_en)
endef
define KernelPackage/mlx4-core/description
@ -1170,7 +1173,11 @@ define KernelPackage/mlx5-core
FILES:=$(LINUX_DIR)/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.ko
KCONFIG:= CONFIG_MLX5_CORE \
CONFIG_MLX5_CORE_EN=y \
CONFIG_MLX5_EN_RXNFC=y
CONFIG_MLX5_EN_RXNFC=y \
CONFIG_MLX5_FPGA=n \
CONFIG_MLX5_MPFS=n \
CONFIG_MLX5_EN_ARFS=n \
CONFIG_MLX5_CORE_IPOIB=n
AUTOLOAD:=$(call AutoProbe,mlx5_core)
endef

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dropbear
PKG_VERSION:=2019.78
PKG_RELEASE:=3
PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:= \

View File

@ -0,0 +1,119 @@
From c153b3612b7c9f24a0f5af43618a646545ed6e22 Mon Sep 17 00:00:00 2001
From: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Date: Mon, 30 Sep 2019 12:42:13 +0100
Subject: [PATCH] Improve address logging on early exit messages
Change 'Early exit' and 'Exit before auth' messages to include the IP
address & port as part of the message.
This allows log scanning utilities such as 'fail2ban' to obtain the
offending IP address as part of the failure event instead of extracting
the PID from the message and then scanning the log again for match
'child connection from' messages
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
---
svr-auth.c | 18 +++++++-----------
svr-session.c | 20 ++++++++++++++------
2 files changed, 21 insertions(+), 17 deletions(-)
--- a/svr-auth.c
+++ b/svr-auth.c
@@ -241,8 +241,7 @@ static int checkusername(const char *use
}
if (strlen(username) != userlen) {
- dropbear_exit("Attempted username with a null byte from %s",
- svr_ses.addrstring);
+ dropbear_exit("Attempted username with a null byte");
}
if (ses.authstate.username == NULL) {
@@ -252,8 +251,7 @@ static int checkusername(const char *use
} else {
/* check username hasn't changed */
if (strcmp(username, ses.authstate.username) != 0) {
- dropbear_exit("Client trying multiple usernames from %s",
- svr_ses.addrstring);
+ dropbear_exit("Client trying multiple usernames");
}
}
@@ -268,8 +266,7 @@ static int checkusername(const char *use
if (!ses.authstate.pw_name) {
TRACE(("leave checkusername: user '%s' doesn't exist", username))
dropbear_log(LOG_WARNING,
- "Login attempt for nonexistent user from %s",
- svr_ses.addrstring);
+ "Login attempt for nonexistent user");
ses.authstate.checkusername_failed = 1;
return DROPBEAR_FAILURE;
}
@@ -279,9 +276,8 @@ static int checkusername(const char *use
if (!(DROPBEAR_SVR_MULTIUSER && uid == 0) && uid != ses.authstate.pw_uid) {
TRACE(("running as nonroot, only server uid is allowed"))
dropbear_log(LOG_WARNING,
- "Login attempt with wrong user %s from %s",
- ses.authstate.pw_name,
- svr_ses.addrstring);
+ "Login attempt with wrong user %s",
+ ses.authstate.pw_name);
ses.authstate.checkusername_failed = 1;
return DROPBEAR_FAILURE;
}
@@ -440,8 +436,8 @@ void send_msg_userauth_failure(int parti
} else {
userstr = ses.authstate.pw_name;
}
- dropbear_exit("Max auth tries reached - user '%s' from %s",
- userstr, svr_ses.addrstring);
+ dropbear_exit("Max auth tries reached - user '%s'",
+ userstr);
}
TRACE(("leave send_msg_userauth_failure"))
--- a/svr-session.c
+++ b/svr-session.c
@@ -149,28 +149,36 @@ void svr_session(int sock, int childpipe
void svr_dropbear_exit(int exitcode, const char* format, va_list param) {
char exitmsg[150];
char fullmsg[300];
+ char fromaddr[60];
int i;
/* Render the formatted exit message */
vsnprintf(exitmsg, sizeof(exitmsg), format, param);
+ /* svr_ses.addrstring may not be set for some early exits, or for
+ the listener process */
+ fromaddr[0] = '\0';
+ if (svr_ses.addrstring) {
+ snprintf(fromaddr, sizeof(fromaddr), " from <%s>", svr_ses.addrstring);
+ }
+
/* Add the prefix depending on session/auth state */
if (!ses.init_done) {
/* before session init */
- snprintf(fullmsg, sizeof(fullmsg), "Early exit: %s", exitmsg);
+ snprintf(fullmsg, sizeof(fullmsg), "Early exit%s: %s", fromaddr, exitmsg);
} else if (ses.authstate.authdone) {
/* user has authenticated */
snprintf(fullmsg, sizeof(fullmsg),
- "Exit (%s): %s",
- ses.authstate.pw_name, exitmsg);
+ "Exit (%s)%s: %s",
+ ses.authstate.pw_name, fromaddr, exitmsg);
} else if (ses.authstate.pw_name) {
/* we have a potential user */
snprintf(fullmsg, sizeof(fullmsg),
- "Exit before auth (user '%s', %u fails): %s",
- ses.authstate.pw_name, ses.authstate.failcount, exitmsg);
+ "Exit before auth%s: (user '%s', %u fails): %s",
+ fromaddr, ses.authstate.pw_name, ses.authstate.failcount, exitmsg);
} else {
/* before userauth */
- snprintf(fullmsg, sizeof(fullmsg), "Exit before auth: %s", exitmsg);
+ snprintf(fullmsg, sizeof(fullmsg), "Exit before auth%s: %s", fromaddr, exitmsg);
}
dropbear_log(LOG_INFO, "%s", fullmsg);

View File

@ -130,6 +130,7 @@ DRV_DEPENDS:=+PACKAGE_kmod-cfg80211:libnl-tiny
define Package/hostapd/Default
SECTION:=net
CATEGORY:=Network
SUBMENU:=WirelessAPD
TITLE:=IEEE 802.1x Authenticator
URL:=http://hostap.epitest.fi/
DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus
@ -191,6 +192,7 @@ endef
define Package/wpad/Default
SECTION:=net
CATEGORY:=Network
SUBMENU:=WirelessAPD
TITLE:=IEEE 802.1x Authenticator/Supplicant
DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus
URL:=http://hostap.epitest.fi/
@ -280,6 +282,7 @@ Package/wpad-mesh-wolfssl/description = $(Package/wpad-mesh/description)
define Package/wpa-supplicant/Default
SECTION:=net
CATEGORY:=Network
SUBMENU:=WirelessAPD
TITLE:=WPA Supplicant
URL:=http://hostap.epitest.fi/wpa_supplicant/
DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus
@ -352,11 +355,13 @@ define Package/hostapd-common
TITLE:=hostapd/wpa_supplicant common support files
SECTION:=net
CATEGORY:=Network
SUBMENU:=WirelessAPD
endef
define Package/hostapd-utils
SECTION:=net
CATEGORY:=Network
SUBMENU:=WirelessAPD
TITLE:=IEEE 802.1x Authenticator (utils)
URL:=http://hostap.epitest.fi/
DEPENDS:=@$(subst $(space),||,$(foreach pkg,$(HOSTAPD_PROVIDERS),PACKAGE_$(pkg)))
@ -370,6 +375,7 @@ endef
define Package/wpa-cli
SECTION:=net
CATEGORY:=Network
SUBMENU:=WirelessAPD
DEPENDS:=@$(subst $(space),||,$(foreach pkg,$(SUPPLICANT_PROVIDERS),PACKAGE_$(pkg)))
TITLE:=WPA Supplicant command line control utility
endef
@ -377,6 +383,7 @@ endef
define Package/eapol-test
TITLE:=802.1x authentication test utility
SECTION:=net
SUBMENU:=WirelessAPD
CATEGORY:=Network
VARIANT:=supplicant-full-internal
DEPENDS:=$(DRV_DEPENDS) +libubus
@ -386,6 +393,7 @@ define Package/eapol-test-openssl
TITLE:=802.1x authentication test utility
SECTION:=net
CATEGORY:=Network
SUBMENU:=WirelessAPD
VARIANT:=supplicant-full-openssl
CONFLICTS:=$(filter-out eapol-test-openssl ,$(EAPOL_TEST_PROVIDERS))
DEPENDS:=$(DRV_DEPENDS) +libubus +libopenssl
@ -396,6 +404,7 @@ define Package/eapol-test-wolfssl
TITLE:=802.1x authentication test utility
SECTION:=net
CATEGORY:=Network
SUBMENU:=WirelessAPD
VARIANT:=supplicant-full-wolfssl
CONFLICTS:=$(filter-out eapol-test-openssl ,$(filter-out eapol-test-wolfssl ,$(EAPOL_TEST_PROVIDERS)))
DEPENDS:=$(DRV_DEPENDS) +libubus +libwolfssl

View File

@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=umdns
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE_URL=$(PROJECT_GIT)/project/mdnsd.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2018-01-02
PKG_SOURCE_VERSION:=78974417e182a3de8f78b7d73366ec0c98396b6c
PKG_MIRROR_HASH:=a60f9eb9428ac3256cd7c3c6d4207c116cedf4d212b82e2f86c1bf7c7898fcbb
PKG_SOURCE_DATE:=2020-04-05
PKG_SOURCE_VERSION:=ab7a39a5b5a0ff74601dd4e82145ca554c1e2ac6
PKG_MIRROR_HASH:=135de61439d823f3631fdcf735bc7a94355ba1d7bb0a2e3a0530a75898e322ef
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
PKG_LICENSE:=LGPL-2.1

View File

@ -1,27 +0,0 @@
From 10050a02f7d508fa88f70fcfceefbacd13488ca7 Mon Sep 17 00:00:00 2001
From: Robert Marko <robimarko@gmail.com>
Date: Mon, 23 Dec 2019 17:05:49 +0200
Subject: [PATCH] mtd: spi-nor: Add 4B_OPCODES flag to w25q256
The w25q256 supports 4-byte opcodes so lets add the flag.
Tested on OpenWrt under 4.19.82 kernel on 8devices Habanero.
Signed-off-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
---
drivers/mtd/spi-nor/spi-nor.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -2480,7 +2480,9 @@ static const struct flash_info spi_nor_i
{ "w25q80", INFO(0xef5014, 0, 64 * 1024, 16, SECT_4K) },
{ "w25q80bl", INFO(0xef4014, 0, 64 * 1024, 16, SECT_4K) },
{ "w25q128", INFO(0xef4018, 0, 64 * 1024, 256, SECT_4K) },
- { "w25q256", INFO(0xef4019, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
+ { "w25q256", INFO(0xef4019, 0, 64 * 1024, 512,
+ SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
+ SPI_NOR_4B_OPCODES) },
{ "w25q256jvm", INFO(0xef7019, 0, 64 * 1024, 512,
SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
{ "w25m512jv", INFO(0xef7119, 0, 64 * 1024, 1024,

View File

@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -2706,7 +2706,7 @@ static int spi_nor_write(struct mtd_info
@@ -2704,7 +2704,7 @@ static int spi_nor_write(struct mtd_info
write_enable(nor);
ret = spi_nor_write_data(nor, addr, page_remain, buf + i);

View File

@ -8,7 +8,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -4886,6 +4886,7 @@ int spi_nor_scan(struct spi_nor *nor, co
@@ -4884,6 +4884,7 @@ int spi_nor_scan(struct spi_nor *nor, co
*/
if (JEDEC_MFR(nor->info) == SNOR_MFR_ATMEL ||
JEDEC_MFR(nor->info) == SNOR_MFR_INTEL ||

View File

@ -17,7 +17,7 @@ Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -4399,6 +4399,7 @@ static void st_micron_set_default_init(s
@@ -4397,6 +4397,7 @@ static void st_micron_set_default_init(s
static void winbond_set_default_init(struct spi_nor *nor)
{
@ -25,7 +25,7 @@ Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
nor->params.set_4byte = winbond_set_4byte;
}
@@ -4888,6 +4889,7 @@ int spi_nor_scan(struct spi_nor *nor, co
@@ -4886,6 +4887,7 @@ int spi_nor_scan(struct spi_nor *nor, co
JEDEC_MFR(nor->info) == SNOR_MFR_INTEL ||
JEDEC_MFR(nor->info) == SNOR_MFR_MACRONIX ||
JEDEC_MFR(nor->info) == SNOR_MFR_SST ||

View File

@ -39,7 +39,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
depends on OF && (ARM || ARM64 || COMPILE_TEST)
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -4466,6 +4466,7 @@ static void spi_nor_info_init_params(str
@@ -4464,6 +4464,7 @@ static void spi_nor_info_init_params(str
struct spi_nor_erase_map *map = &params->erase_map;
const struct flash_info *info = nor->info;
struct device_node *np = spi_nor_get_flash_node(nor);
@ -47,7 +47,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
u8 i, erase_mask;
/* Initialize legacy flash parameters and settings. */
@@ -4529,6 +4530,21 @@ static void spi_nor_info_init_params(str
@@ -4527,6 +4528,21 @@ static void spi_nor_info_init_params(str
*/
erase_mask = 0;
i = 0;
@ -69,7 +69,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (info->flags & SECT_4K_PMC) {
erase_mask |= BIT(i);
spi_nor_set_erase_type(&map->erase_type[i], 4096u,
@@ -4540,6 +4556,7 @@ static void spi_nor_info_init_params(str
@@ -4538,6 +4554,7 @@ static void spi_nor_info_init_params(str
SPINOR_OP_BE_4K);
i++;
}

View File

@ -30,7 +30,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -2506,6 +2506,9 @@ static const struct flash_info spi_nor_i
@@ -2504,6 +2504,9 @@ static const struct flash_info spi_nor_i
/* XMC (Wuhan Xinxin Semiconductor Manufacturing Corp.) */
{ "XM25QH64A", INFO(0x207017, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
{ "XM25QH128A", INFO(0x207018, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },

View File

@ -84,7 +84,8 @@ define KernelPackage/dma-ralink
CONFIG_DMA_RALINK
FILES:= \
$(LINUX_DIR)/drivers/dma/virt-dma.ko \
$(LINUX_DIR)/drivers/dma/ralink-gdma.ko
$(LINUX_DIR)/drivers/dma/ralink-gdma.ko@lt5.4 \
$(LINUX_DIR)/drivers/staging/ralink-gdma/ralink-gdma.ko@ge5.4
AUTOLOAD:=$(call AutoLoad,52,ralink-gdma)
endef
@ -104,7 +105,8 @@ define KernelPackage/hsdma-mtk
CONFIG_MTK_HSDMA
FILES:= \
$(LINUX_DIR)/drivers/dma/virt-dma.ko \
$(LINUX_DIR)/drivers/dma/mtk-hsdma.ko
$(LINUX_DIR)/drivers/dma/mtk-hsdma.ko@lt5.4 \
$(LINUX_DIR)/drivers/staging/mt7621-dma/mtk-hsdma.ko@ge5.4
AUTOLOAD:=$(call AutoLoad,53,mtk-hsdma)
endef