summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-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 8b2df8e..a3f4402 100644
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -1848,7 +1848,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 3391d57..c4651ef 100644
--- a/sys/netinet6/icmp6.c
+++ b/sys/netinet6/icmp6.c
@@ -1122,6 +1122,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;
OpenPOWER on IntegriCloud