vnet: set frame overhead at interface registration

Type: fix
Fixes: 1cd0e5dd53

In vnet_eth_register_interface(), max frame size was being used where
frame overhead was intended.

Change-Id: I6e6de25e2d616caaf35730ab3d15235ec679ebdd
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
This commit is contained in:
Matthew Smith
2022-03-23 22:11:32 +00:00
committed by Damjan Marion
parent 720820e64b
commit bf82a66de7

View File

@ -384,8 +384,8 @@ vnet_eth_register_interface (vnet_main_t *vnm,
hi->min_frame_size = ETHERNET_MIN_PACKET_BYTES;
hi->frame_overhead =
r->frame_overhead ?
r->max_frame_size :
sizeof (ethernet_header_t) + 2 * sizeof (ethernet_vlan_header_t);
r->frame_overhead :
sizeof (ethernet_header_t) + 2 * sizeof (ethernet_vlan_header_t);
hi->max_frame_size = r->max_frame_size ?
r->max_frame_size :
ethernet_main.default_mtu + hi->frame_overhead;