[PATCH 0/2] IPv6 Network Discovery Boundary Variable and Packed Structure

2023-05-18 Thread emohandesi
From: Ehsan Mohandesi This series addresses the following. 1. Coverity Issue (CID 450971): Loop boundary variables should be checked to be within appropriate limits. 2. Making the structure icmp6_ra_prefix_info packed because it contains network protocol

[PATCH 2/2] net: ipv6: network protocol structures should be packed

2023-05-18 Thread emohandesi
From: Ehsan Mohandesi The structure icmp6_ra_prefix_info needs to be packed because it is read from a network stream. Signed-off-by: Ehsan Mohandesi --- include/net6.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/net6.h b/include/net6.h index beafc05..1e766aa

[PATCH 1/2] net: ipv6: router advertisement message length should be within limits

2023-05-18 Thread emohandesi
From: Ehsan Mohandesi The argument len passed to function process_ra is the length of the IPv6 router advertisement message and needs to be between 0 and MTU because it is assigned to remaining_option_len and used as a loop variable. Addresses-Coverity-ID: 450971 ("TAINTED_SCALAR")

[PATCH v4 1/3] net: ipv6: Add support for default gateway discovery.

2023-04-21 Thread emohandesi
From: Ehsan Mohandesi In IPv6, the default gateway and prefix length are determined by receiving a router advertisement as defined in - https://www.rfc-editor.org/rfc/rfc4861. Add support for sending router solicitation (RS) and processing router advertisements (RA). If the RA has prefix info

[PATCH v4 3/3] test: eth: IPv6 network discovery unit test

2023-04-21 Thread emohandesi
From: Ehsan Mohandesi Test router advertisement validation and processing functions. Signed-off-by: Ehsan Mohandesi --- test/dm/eth.c | 88 +++ 1 file changed, 88 insertions(+) diff --git a/test/dm/eth.c b/test/dm/eth.c index

[PATCH v4 2/3] test/py: IPv6 network discovery test

2023-04-21 Thread emohandesi
From: Ehsan Mohandesi Test the IPv6 network discovery feature if indicated by boardenv file. Signed-off-by: Ehsan Mohandesi --- configs/sandbox64_defconfig| 2 ++ configs/sandbox_defconfig | 2 ++ configs/sandbox_flattree_defconfig | 2 ++ test/py/tests/test_net.py

[PATCH v4 0/3] Add IPv6 Network Discovery

2023-04-21 Thread emohandesi
From: Ehsan Mohandesi This series adds IPv6 network discovery to U-Boot. When an IPv6 command is run in U-Boot, it sends a router solicitation (RS) message to the network. The router on the network responds with a router advertisement (RA) message. Then U-Boot processes the RA message and sets

[PATCH v3 2/3] test/py: IPv6 network discovery test

2023-04-12 Thread emohandesi
From: Ehsan Mohandesi Test the IPv6 network discovery feature if indicated by boardenv file. Signed-off-by: Ehsan Mohandesi Conflicts: configs/sandbox64_defconfig configs/sandbox_defconfig configs/sandbox_flattree_defconfig --- configs/sandbox64_defconfig| 2

[PATCH v3 1/3] net: ipv6: Add support for default gateway discovery.

2023-04-12 Thread emohandesi
From: Ehsan Mohandesi In IPv6, the default gateway and prefix length are determined by receiving a router advertisement as defined in - https://www.rfc-editor.org/rfc/rfc4861. Add support for sending router solicitation (RS) and processing router advertisements (RA). If the RA has prefix info

[PATCH v3 3/3] test: eth: IPv6 network discovery unit test

2023-04-12 Thread emohandesi
From: Ehsan Mohandesi Test router advertisement validation and processing functions. Signed-off-by: Ehsan Mohandesi --- test/dm/eth.c | 88 +++ 1 file changed, 88 insertions(+) diff --git a/test/dm/eth.c b/test/dm/eth.c index

[PATCH v3 0/3] Add IPv6 Network Discovery

2023-04-12 Thread emohandesi
From: Ehsan Mohandesi This series adds IPv6 network discovery to U-Boot. When an IPv6 command is run in U-Boot, it sends a router solicitation (RS) message to the network. The router on the network responds with a router advertisement (RA) message. Then U-Boot processes the RA message and sets

[PATCH v2 2/4] net: ipv6: Add support for default gateway discovery.

2023-04-10 Thread emohandesi
From: Ehsan Mohandesi In IPv6, the default gateway and prefix length are determined by receiving a router advertisement as defined in - https://www.rfc-editor.org/rfc/rfc4861. Add support for sending router solicitation (RS) and processing router advertisements (RA). If the RA has prefix info

[PATCH v2 1/4] Revert "net: ipv6: Add support for default gateway discovery."

2023-04-10 Thread emohandesi
From: Ehsan Mohandesi This reverts commit 0af1035a55d9c1486b2db43ee70ff0a63affd4f4. Signed-off-by: Ehsan Mohandesi Conflicts: cmd/Kconfig include/net.h include/net6.h net/net.c --- include/net.h | 4 ++-- net/net.c | 3 +++ 2 files changed, 5

[PATCH v2 4/4] test: eth: IPv6 network discovery unit test

2023-04-10 Thread emohandesi
From: Ehsan Mohandesi Test router advertisement validation and processing functions. Signed-off-by: Ehsan Mohandesi --- test/dm/eth.c | 88 +++ 1 file changed, 88 insertions(+) diff --git a/test/dm/eth.c b/test/dm/eth.c index

[PATCH v2 0/4] Add IPv6 Network Discovery

2023-04-10 Thread emohandesi
From: Ehsan Mohandesi This series adds IPv6 network discovery to U-Boot. When an IPv6 command is run in U-Boot, it sends a router solicitation (RS) message to the network. The router on the network responds with a router advertisement (RA) message. Then U-Boot processes the RA message and sets

[PATCH v2 3/4] test/py: IPv6 network discovery test

2023-04-10 Thread emohandesi
From: Ehsan Mohandesi Test the IPv6 network discovery feature if indicated by boardenv file. Signed-off-by: Ehsan Mohandesi Conflicts: configs/sandbox64_defconfig configs/sandbox_defconfig configs/sandbox_flattree_defconfig --- configs/sandbox64_defconfig| 2

[PATCH] net: ipv6: Add support for default gateway discovery.

2023-03-02 Thread emohandesi
From: Ehsan Mohandesi In IPv6, the default gateway and prefix length are determined by receiving a router advertisement as defined in - https://www.rfc-editor.org/rfc/rfc4861. Add support for sending router solicitation (RS) and processing router advertisements (RA). If the RA has prefix info

[PATCH] net: ipv6: Fixed IPv6 string to address conversion off-by-one error

2023-01-13 Thread emohandesi
From: Ehsan Mohandesi One extra character was being checked in the IPv6 string which caused the last character of the address to be neither '\0' nor ':'. This raises an error condition and causes the function to always return an error. This issue was resolved by this fix. Signed-off-by: Ehsan