aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Haferkamp <rhafer@suse.com>2020-07-03 14:56:27 +0200
committerRalf Haferkamp <rhafer@suse.com>2020-07-03 14:56:27 +0200
commitf1941d6da6cade08f47153224304183df66b6199 (patch)
treed2a71e28196149914274a286841d33a7151c91e6
parentc7ede54cbd2e2b25385325600958ba0124e31cc0 (diff)
downloadslirp-f1941d6da6cade08f47153224304183df66b6199.zip
slirp-f1941d6da6cade08f47153224304183df66b6199.tar.gz
slirp-f1941d6da6cade08f47153224304183df66b6199.tar.bz2
Fix MTU check
The size for Header has to be accounted for as well.
-rw-r--r--src/ip6_input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ip6_input.c b/src/ip6_input.c
index d88d1ab..a83e4f8 100644
--- a/src/ip6_input.c
+++ b/src/ip6_input.c
@@ -44,7 +44,7 @@ void ip6_input(struct mbuf *m)
goto bad;
}
- if (ntohs(ip6->ip_pl) > slirp->if_mtu) {
+ if (ntohs(ip6->ip_pl) + sizeof(struct ip6) > slirp->if_mtu) {
icmp6_send_error(m, ICMP6_TOOBIG, 0);
goto bad;
}