]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
tipc: fix incompatible mtu of transmission
authorHoang Le <hoang.h.le@dektech.com.au>
Mon, 30 Nov 2020 02:55:44 +0000 (09:55 +0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Dec 2020 09:42:01 +0000 (10:42 +0100)
[ Upstream commit 0643334902fcdc770e2d9555811200213339a3f6 ]

In commit 682cd3cf946b6
("tipc: confgiure and apply UDP bearer MTU on running links"), we
introduced a function to change UDP bearer MTU and applied this new value
across existing per-link. However, we did not apply this new MTU value at
node level. This lead to packet dropped at link level if its size is
greater than new MTU value.

To fix this issue, we also apply this new MTU value for node level.

Fixes: 682cd3cf946b6 ("tipc: confgiure and apply UDP bearer MTU on running links")
Acked-by: Jon Maloy <jmaloy@redhat.com>
Signed-off-by: Hoang Le <hoang.h.le@dektech.com.au>
Link: https://lore.kernel.org/r/20201130025544.3602-1-hoang.h.le@dektech.com.au
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/tipc/node.c

index e4cf515e323f37192d4c6487aeea5b6c45477142..8c9c12072a784814987e1370876d42d8bb151cb9 100644 (file)
@@ -2171,6 +2171,8 @@ void tipc_node_apply_property(struct net *net, struct tipc_bearer *b,
                        else if (prop == TIPC_NLA_PROP_MTU)
                                tipc_link_set_mtu(e->link, b->mtu);
                }
+               /* Update MTU for node link entry */
+               e->mtu = tipc_link_mss(e->link);
                tipc_node_write_unlock(n);
                tipc_bearer_xmit(net, bearer_id, &xmitq, &e->maddr, NULL);
        }