summaryrefslogtreecommitdiff
path: root/slirp/ip6_input.c
diff options
context:
space:
mode:
Diffstat (limited to 'slirp/ip6_input.c')
-rw-r--r--slirp/ip6_input.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/slirp/ip6_input.c b/slirp/ip6_input.c
index ca0007c14c..b6a438d7af 100644
--- a/slirp/ip6_input.c
+++ b/slirp/ip6_input.c
@@ -39,9 +39,14 @@ void ip6_input(struct mbuf *m)
goto bad;
}
+ if (ntohs(ip6->ip_pl) > IF_MTU) {
+ icmp6_send_error(m, ICMP6_TOOBIG, 0);
+ goto bad;
+ }
+
/* check ip_ttl for a correct ICMP reply */
if (ip6->ip_hl == 0) {
- /*icmp_send_error(m, ICMP_TIMXCEED,ICMP_TIMXCEED_INTRANS, 0,"ttl");*/
+ icmp6_send_error(m, ICMP6_TIMXCEED, ICMP6_TIMXCEED_INTRANS);
goto bad;
}
@@ -50,10 +55,10 @@ void ip6_input(struct mbuf *m)
*/
switch (ip6->ip_nh) {
case IPPROTO_TCP:
- /*tcp_input(m, hlen, (struct socket *)NULL);*/
+ icmp6_send_error(m, ICMP6_UNREACH, ICMP6_UNREACH_NO_ROUTE);
break;
case IPPROTO_UDP:
- /*udp_input(m, hlen);*/
+ icmp6_send_error(m, ICMP6_UNREACH, ICMP6_UNREACH_NO_ROUTE);
break;
case IPPROTO_ICMPV6:
icmp6_input(m);