[U-Boot] [PATCH 1/2] net: fix vlan validation

VLAN identifiers are 12-bit decimal numbers, not IP addresses.
Signed-off-by: Stefan Agner stefan@agner.ch ---
include/env_flags.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/env_flags.h b/include/env_flags.h index 9e87e1b..0dcec06 100644 --- a/include/env_flags.h +++ b/include/env_flags.h @@ -57,8 +57,8 @@ enum env_flags_varaccess { "gatewayip:i," \ "netmask:i," \ "serverip:i," \ - "nvlan:i," \ - "vlan:i," \ + "nvlan:d," \ + "vlan:d," \ "dnsip:i," #else #define ETHADDR_FLAGS

Ethernet packages with IEEE 802.1Q VLAN support may be up to 1522 bytes long. Increase the default size used to allocate packet storage by 4 bytes.
Signed-off-by: Stefan Agner stefan@agner.ch ---
include/net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/net.h b/include/net.h index 1fb4194..a97e530 100644 --- a/include/net.h +++ b/include/net.h @@ -476,7 +476,7 @@ struct icmp_hdr { * maximum packet size = 1518 * maximum packet size and multiple of 32 bytes = 1536 */ -#define PKTSIZE 1518 +#define PKTSIZE 1522 #define PKTSIZE_ALIGN 1536 /*#define PKTSIZE 608*/

On Tue, Apr 12, 2016 at 04:09:50PM -0700, Stefan Agner wrote:
Ethernet packages with IEEE 802.1Q VLAN support may be up to 1522 bytes long. Increase the default size used to allocate packet storage by 4 bytes.
Signed-off-by: Stefan Agner stefan@agner.ch
include/net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/net.h b/include/net.h index 1fb4194..a97e530 100644 --- a/include/net.h +++ b/include/net.h @@ -476,7 +476,7 @@ struct icmp_hdr {
- maximum packet size = 1518
This comment is now wrong too, please update or maybe add: * maximum packet size and VLAN header = 1522
- maximum packet size and multiple of 32 bytes = 1536
*/ -#define PKTSIZE 1518 +#define PKTSIZE 1522 #define PKTSIZE_ALIGN 1536 /*#define PKTSIZE 608*/
-- 2.8.0
U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
participants (2)
-
Stefan Agner
-
Tom Rini