From bf9c208d6942f318ebed4071cd9c20d537acd403 Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Fri, 5 Jul 1996 23:42:12 +0000 Subject: (setup_ethernet_device): Linux's device `mtu' member does not include the hardware header size; subtract that off the value the kernel specifies as maximum packet size in setting ETHER_DEV.mtu. --- pfinet/ethernet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pfinet/ethernet.c') diff --git a/pfinet/ethernet.c b/pfinet/ethernet.c index 1048fabf..bb5632de 100644 --- a/pfinet/ethernet.c +++ b/pfinet/ethernet.c @@ -219,7 +219,7 @@ setup_ethernet_device (char *name) /* Fetch hardware information */ count = NET_STATUS_COUNT; device_get_status (ether_port, NET_STATUS, (dev_status_t) &netstat, &count); - ether_dev.mtu = netstat.max_packet_size; + ether_dev.mtu = netstat.max_packet_size - ether_dev.hard_header_len; assert (netstat.header_format == HDR_ETHERNET); assert (netstat.header_size == ETH_HLEN); assert (netstat.address_size == ETH_ALEN); -- cgit v1.2.3