summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon L. B. Nielsen <simon@FreeBSD.org>2008-09-03 19:09:47 +0000
committerSimon L. B. Nielsen <simon@FreeBSD.org>2008-09-03 19:09:47 +0000
commit86892f34aefe79b577db74981e520f0b943632bb (patch)
tree6a81d07a50e07bca89a87a44e4c9d8016fb9250b
parentea162ac5b01ddb87475f2a2a0da052d9a0bcff2f (diff)
Notes
-rw-r--r--sys/kern/vfs_mount.c3
-rw-r--r--sys/netinet6/icmp6.c9
2 files changed, 11 insertions, 1 deletions
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
index f40059e447a1..fad8a08f67af 100644
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -1839,7 +1839,8 @@ vfs_filteropt(struct vfsoptlist *opts, const char **legal)
}
if (*t != NULL)
continue;
- sprintf(errmsg, "mount option <%s> is unknown", p);
+ snprintf(errmsg, sizeof(errmsg),
+ "mount option <%s> is unknown", p);
printf("%s\n", errmsg);
ret = EINVAL;
}
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c
index 167b092f2e13..e79915a2590d 100644
--- a/sys/netinet6/icmp6.c
+++ b/sys/netinet6/icmp6.c
@@ -1119,6 +1119,15 @@ icmp6_mtudisc_update(struct ip6ctlparam *ip6cp, int validated)
if (!validated)
return;
+ /*
+ * In case the suggested mtu is less than IPV6_MMTU, we
+ * only need to remember that it was for above mentioned
+ * "alwaysfrag" case.
+ * Try to be as close to the spec as possible.
+ */
+ if (mtu < IPV6_MMTU)
+ mtu = IPV6_MMTU - 8;
+
bzero(&inc, sizeof(inc));
inc.inc_flags = 1; /* IPv6 */
inc.inc6_faddr = *dst;