svn commit: r248743 - stable/9/sys/net
Alexander V. Chernikov
melifaro at FreeBSD.org
Tue Mar 26 19:04:26 UTC 2013
On 26.03.2013 22:57, Alexander V. Chernikov wrote:
> Author: melifaro
> Date: Tue Mar 26 18:57:25 2013
> New Revision: 248743
> URL: http://svnweb.freebsd.org/changeset/base/248743
>
> Log:
Merge r238492.
> Permit changing MTU in 6to4 relay.
>
> This behavior is recommended by RFC 4213 clause 3.2.
>
> Sometimes fragmentation is the least evil.
> For example, some Linux IPVS kernels forwards
> ICMPv6 checksums to real servers incorrectly.
>
> Modified:
> stable/9/sys/net/if_stf.c
> Directory Properties:
> stable/9/sys/ (props changed)
> stable/9/sys/net/ (props changed)
>
> Modified: stable/9/sys/net/if_stf.c
> ==============================================================================
> --- stable/9/sys/net/if_stf.c Tue Mar 26 18:46:40 2013 (r248742)
> +++ stable/9/sys/net/if_stf.c Tue Mar 26 18:57:25 2013 (r248743)
> @@ -799,7 +799,7 @@ stf_rtrequest(cmd, rt, info)
> struct rt_addrinfo *info;
> {
> RT_LOCK_ASSERT(rt);
> - rt->rt_rmx.rmx_mtu = IPV6_MMTU;
> + rt->rt_rmx.rmx_mtu = rt->rt_ifp->if_mtu;
> }
>
> static int
> @@ -812,7 +812,7 @@ stf_ioctl(ifp, cmd, data)
> struct ifreq *ifr;
> struct sockaddr_in6 *sin6;
> struct in_addr addr;
> - int error;
> + int error, mtu;
>
> error = 0;
> switch (cmd) {
> @@ -846,6 +846,18 @@ stf_ioctl(ifp, cmd, data)
> error = EAFNOSUPPORT;
> break;
>
> + case SIOCGIFMTU:
> + break;
> +
> + case SIOCSIFMTU:
> + ifr = (struct ifreq *)data;
> + mtu = ifr->ifr_mtu;
> + /* RFC 4213 3.2 ideal world MTU */
> + if (mtu < IPV6_MINMTU || mtu > IF_MAXMTU - 20)
> + return (EINVAL);
> + ifp->if_mtu = mtu;
> + break;
> +
> default:
> error = EINVAL;
> break;
>
--
WBR, Alexander
More information about the svn-src-stable-9
mailing list