summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/ip6_output.c
diff options
context:
space:
mode:
authordwhite <dwhite@FreeBSD.org>2004-10-02 23:45:02 +0000
committerdwhite <dwhite@FreeBSD.org>2004-10-02 23:45:02 +0000
commit7ac950b1172f3d9213061f3918e5cd1c96ef5c43 (patch)
tree45a4a2f116fd44670f83c5375560ae4c2259bf6f /sys/netinet6/ip6_output.c
parent9f302cddd10c0f628b3434f06deb3d7ce48c3482 (diff)
downloadFreeBSD-src-7ac950b1172f3d9213061f3918e5cd1c96ef5c43.zip
FreeBSD-src-7ac950b1172f3d9213061f3918e5cd1c96ef5c43.tar.gz
Disable MTU feedback in IPv6 if the sender writes data that must be fragmented.
Discussed extensively with KAME. The API author's intent isn't clear at this point, so rather than remove the code entirely, #if 0 out and put a big comment in for now. The IPV6_RECVPATHMTU sockopt is available if the application wants to be notified of the path MTU to optimize packet sizes. Thanks to JINMEI Tatuya <jinmei@isl.rdc.toshiba.co.jp> for putting up with my incessant badgering on this issue, and fenner for pointing out the API issue and suggesting solutions.
Diffstat (limited to 'sys/netinet6/ip6_output.c')
-rw-r--r--sys/netinet6/ip6_output.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c
index 03ef3bc..22be481 100644
--- a/sys/netinet6/ip6_output.c
+++ b/sys/netinet6/ip6_output.c
@@ -1035,8 +1035,10 @@ passout:
struct ip6_frag *ip6f;
u_int32_t id = htonl(ip6_randomid());
u_char nextproto;
+#if 0
struct ip6ctlparam ip6cp;
u_int32_t mtu32;
+#endif
int qslots = ifp->if_snd.ifq_maxlen - ifp->if_snd.ifq_len;
/*
@@ -1048,12 +1050,24 @@ passout:
if (mtu > IPV6_MAXPACKET)
mtu = IPV6_MAXPACKET;
+#if 0
+ /*
+ * It is believed this code is a leftover from the
+ * development of the IPV6_RECVPATHMTU sockopt and
+ * associated work to implement RFC3542.
+ * It's not entirely clear what the intent of the API
+ * is at this point, so disable this code for now.
+ * The IPV6_RECVPATHMTU sockopt and/or IPV6_DONTFRAG
+ * will send notifications if the application requests.
+ */
+
/* Notify a proper path MTU to applications. */
mtu32 = (u_int32_t)mtu;
bzero(&ip6cp, sizeof(ip6cp));
ip6cp.ip6c_cmdarg = (void *)&mtu32;
pfctlinput2(PRC_MSGSIZE, (struct sockaddr *)&ro_pmtu->ro_dst,
(void *)&ip6cp);
+#endif
len = (mtu - hlen - sizeof(struct ip6_frag)) & ~7;
if (len < 8) {
OpenPOWER on IntegriCloud