diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2016-11-02 23:09:44 +0300 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2018-01-13 18:37:24 +0300 |
commit | 4adf7bf7bbaefe71133305193c25d32863115dda (patch) | |
tree | 78f53781df9ee62acb24d40ab5c25053ee67eef3 /drivers | |
parent | bebc6082da0a9f5d47a1ea2edc099bf671058bd4 (diff) | |
download | linux-4adf7bf7bbaefe71133305193c25d32863115dda.tar.xz |
firewire: net: max MTU off by one
The latest max_mtu patch missed that datagram_size is actually one less
than the datagram's Total Length.
Fixes: 357f4aae859b ("firewire: net: really fix maximum possible MTU")
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/firewire/net.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c index 242359c2d1f1..60e75e6d9104 100644 --- a/drivers/firewire/net.c +++ b/drivers/firewire/net.c @@ -1480,9 +1480,14 @@ static int fwnet_probe(struct fw_unit *unit, goto out; dev->local_fifo = dev->handler.offset; + /* + * default MTU: RFC 2734 cl. 4, RFC 3146 cl. 4 + * maximum MTU: RFC 2734 cl. 4.2, fragment encapsulation header's + * maximum possible datagram_size + 1 = 0xfff + 1 + */ net->mtu = 1500U; net->min_mtu = ETH_MIN_MTU; - net->max_mtu = 0xfff; + net->max_mtu = 4096U; /* Set our hardware address while we're at it */ ha = (union fwnet_hwaddr *)net->dev_addr; |