Merge branch '2023-06-14-assorted-fixes'

- Fix some issues Coverity Scan reported in IPv6, SPL EXTn support fix,
  two small bootstd fixes, one Kconfig dependency fix, and fix booting
  on Pinephone Pro
diff --git a/boot/Kconfig b/boot/Kconfig
index eea5ed6..a643a3d 100644
--- a/boot/Kconfig
+++ b/boot/Kconfig
@@ -397,19 +397,6 @@
 	        U-Boot)
 	    - bootflow - a description of how to boot (owned by the distro)
 
-config BOOTSTD_FULL
-	bool "Enhanced features for standard boot"
-	default y if SANDBOX
-	help
-	  This enables various useful features for standard boot, which are not
-	  essential for operation:
-
-	  - bootdev, bootmeth commands
-	  - extra features in the bootflow command
-	  - support for selecting the ordering of bootmeths ("bootmeth order")
-	  - support for selecting the ordering of bootdevs using the devicetree
-	    as well as the "boot_targets" environment variable
-
 config SPL_BOOTSTD
 	bool "Standard boot support in SPL"
 	depends on SPL && SPL_DM && SPL_OF_CONTROL && SPL_BLK
@@ -432,6 +419,19 @@
 
 if BOOTSTD
 
+config BOOTSTD_FULL
+	bool "Enhanced features for standard boot"
+	default y if SANDBOX
+	help
+	  This enables various useful features for standard boot, which are not
+	  essential for operation:
+
+	  - bootdev, bootmeth commands
+	  - extra features in the bootflow command
+	  - support for selecting the ordering of bootmeths ("bootmeth order")
+	  - support for selecting the ordering of bootdevs using the devicetree
+	    as well as the "boot_targets" environment variable
+
 config BOOTSTD_DEFAULTS
 	bool "Select some common defaults for standard boot"
 	depends on BOOTSTD
diff --git a/boot/bootmeth_extlinux.c b/boot/bootmeth_extlinux.c
index 24be076..6b2b840 100644
--- a/boot/bootmeth_extlinux.c
+++ b/boot/bootmeth_extlinux.c
@@ -150,7 +150,7 @@
 	info.dev = dev;
 	info.bflow = bflow;
 	ret = pxe_setup_ctx(&ctx, &cmdtp, extlinux_getfile, &info, true,
-			    bflow->subdir, false);
+			    bflow->fname, false);
 	if (ret)
 		return log_msg_ret("ctx", -EINVAL);
 
diff --git a/cmd/net.c b/cmd/net.c
index 68d4062..9e1f40a 100644
--- a/cmd/net.c
+++ b/cmd/net.c
@@ -209,7 +209,7 @@
 
 static void netboot_update_env(void)
 {
-	char tmp[44];
+	char tmp[46];
 
 	if (net_gateway.s_addr) {
 		ip_to_string(net_gateway, tmp);
@@ -274,20 +274,20 @@
 	if (IS_ENABLED(CONFIG_IPV6)) {
 		if (!ip6_is_unspecified_addr(&net_ip6) ||
 		    net_prefix_length != 0) {
-			sprintf(tmp, "%pI6c", &net_ip6);
 			if (net_prefix_length != 0)
-				sprintf(tmp, "%s/%d", tmp, net_prefix_length);
-
+				snprintf(tmp, sizeof(tmp), "%pI6c/%d", &net_ip6, net_prefix_length);
+			else
+				snprintf(tmp, sizeof(tmp), "%pI6c", &net_ip6);
 			env_set("ip6addr", tmp);
 		}
 
 		if (!ip6_is_unspecified_addr(&net_server_ip6)) {
-			sprintf(tmp, "%pI6c", &net_server_ip6);
+			snprintf(tmp, sizeof(tmp), "%pI6c", &net_server_ip6);
 			env_set("serverip6", tmp);
 		}
 
 		if (!ip6_is_unspecified_addr(&net_gateway6)) {
-			sprintf(tmp, "%pI6c", &net_gateway6);
+			snprintf(tmp, sizeof(tmp), "%pI6c", &net_gateway6);
 			env_set("gatewayip6", tmp);
 		}
 	}
diff --git a/common/spl/spl_ext.c b/common/spl/spl_ext.c
index f117c63..2bf3434 100644
--- a/common/spl/spl_ext.c
+++ b/common/spl/spl_ext.c
@@ -28,7 +28,7 @@
 
 	ext4fs_set_blk_dev(block_dev, &part_info);
 
-	err = ext4fs_mount(0);
+	err = ext4fs_mount(part_info.size);
 	if (!err) {
 #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
 		printf("%s: ext4fs mount err - %d\n", __func__, err);
@@ -82,7 +82,7 @@
 
 	ext4fs_set_blk_dev(block_dev, &part_info);
 
-	err = ext4fs_mount(0);
+	err = ext4fs_mount(part_info.size);
 	if (!err) {
 #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
 		printf("%s: ext4fs mount err - %d\n", __func__, err);
diff --git a/configs/pinephone-pro-rk3399_defconfig b/configs/pinephone-pro-rk3399_defconfig
index 4edea88..e4a8bee 100644
--- a/configs/pinephone-pro-rk3399_defconfig
+++ b/configs/pinephone-pro-rk3399_defconfig
@@ -73,6 +73,7 @@
 CONFIG_REGULATOR_PWM=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
+CONFIG_RAM_ROCKCHIP_LPDDR4=y
 CONFIG_DM_RNG=y
 CONFIG_RNG_ROCKCHIP=y
 CONFIG_BAUDRATE=1500000
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 09039a2..39eee98 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -633,6 +633,7 @@
 
 config RTL8169
 	bool "Realtek 8169 series Ethernet controller driver"
+	depends on PCI
 	help
 	  This driver supports Realtek 8169 series gigabit ethernet family of
 	  PCI/PCIe chipsets/adapters.
diff --git a/net/dhcpv6.c b/net/dhcpv6.c
index 0d1c600..73a1067 100644
--- a/net/dhcpv6.c
+++ b/net/dhcpv6.c
@@ -316,6 +316,11 @@
 		option_ptr = ((uchar *)option_hdr) + sizeof(struct dhcp6_hdr);
 		option_len = ntohs(option_hdr->option_len);
 
+		if (option_ptr + option_len > rx_pkt + len) {
+			debug("Invalid option length\n");
+			return;
+		}
+
 		switch (ntohs(option_hdr->option_id)) {
 		case DHCP6_OPTION_CLIENTID:
 			if (memcmp(option_ptr, sm_params.duid, option_len)
diff --git a/net/dhcpv6.h b/net/dhcpv6.h
index 80ca520..65c8e4c 100644
--- a/net/dhcpv6.h
+++ b/net/dhcpv6.h
@@ -38,7 +38,7 @@
 #define DUID_MAX_SIZE		DUID_LL_SIZE /* only supports DUID-LL currently */
 
 /* vendor-class-data to send in vendor clas option */
-#define DHCP6_VCI_STRING	"U-boot"
+#define DHCP6_VCI_STRING	"U-Boot"
 
 #define DHCP6_MULTICAST_ADDR	"ff02::1:2"	/* DHCP multicast address */