summaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6_output.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2022-03-17 21:56:06 +0100
committerJakub Kicinski <kuba@kernel.org>2022-03-17 21:56:58 +0100
commite243f39685af1bd6d837fa7bff40c1afdf3eb7fa (patch)
tree61e9d9b74a0814f950a693ebe8061293e4960b1e /net/ipv6/ip6_output.c
parentselftests: net: fix array_size.cocci warning (diff)
parentMerge tag 'net-5.17-final' of git://git.kernel.org/pub/scm/linux/kernel/git/n... (diff)
downloadlinux-e243f39685af1bd6d837fa7bff40c1afdf3eb7fa.tar.xz
linux-e243f39685af1bd6d837fa7bff40c1afdf3eb7fa.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
No conflicts. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv6/ip6_output.c')
-rw-r--r--net/ipv6/ip6_output.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index a76fba3dd47a..e23f058166af 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -1475,8 +1475,8 @@ static int __ip6_append_data(struct sock *sk,
sizeof(struct frag_hdr) : 0) +
rt->rt6i_nfheader_len;
- if (mtu < fragheaderlen ||
- ((mtu - fragheaderlen) & ~7) + fragheaderlen < sizeof(struct frag_hdr))
+ if (mtu <= fragheaderlen ||
+ ((mtu - fragheaderlen) & ~7) + fragheaderlen <= sizeof(struct frag_hdr))
goto emsgsize;
maxfraglen = ((mtu - fragheaderlen) & ~7) + fragheaderlen -