Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Sep 2014 23:03:56 +0200
From:      Michael Tuexen <tuexen@freebsd.org>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>
Subject:   Re: svn commit: r272326 - head/sys/netinet
Message-ID:  <4A8FE3A2-B085-4EBC-8E3E-F5A91129EEDE@freebsd.org>
In-Reply-To: <CAJ-VmokpSDkJGzWajLafemKgc_zx%2B8H05vFzjvSKdYRS2c79CQ@mail.gmail.com>
References:  <201409302029.s8UKTx0e098653@svn.freebsd.org> <CAJ-VmokpSDkJGzWajLafemKgc_zx%2B8H05vFzjvSKdYRS2c79CQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 30 Sep 2014, at 22:47, Adrian Chadd <adrian@freebsd.org> wrote:

> Hi,
>=20
> I think you should consider adding a new set of protocol counters for
> UDPLITE. :)
Yepp. There is
http://tools.ietf.org/html/rfc5097
which needs to be implemented.

Best regards
Michael
>=20
>=20
>=20
> -a
>=20
> On 30 September 2014 13:29, Michael Tuexen <tuexen@freebsd.org> wrote:
>> Author: tuexen
>> Date: Tue Sep 30 20:29:58 2014
>> New Revision: 272326
>> URL: http://svnweb.freebsd.org/changeset/base/272326
>>=20
>> Log:
>>  UDPLite requires a checksum. Therefore, discard a received packet if
>>  the checksum is 0.
>>=20
>>  MFC after: 3 days
>>=20
>> Modified:
>>  head/sys/netinet/udp_usrreq.c
>>=20
>> Modified: head/sys/netinet/udp_usrreq.c
>> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
>> --- head/sys/netinet/udp_usrreq.c       Tue Sep 30 20:18:10 2014      =
  (r272325)
>> +++ head/sys/netinet/udp_usrreq.c       Tue Sep 30 20:29:58 2014      =
  (r272326)
>> @@ -498,8 +498,16 @@ udp_input(struct mbuf **mp, int *offp, i
>>                        m_freem(m);
>>                        return (IPPROTO_DONE);
>>                }
>> -       } else
>> -               UDPSTAT_INC(udps_nosum);
>> +       } else {
>> +               if (proto =3D=3D IPPROTO_UDP) {
>> +                       UDPSTAT_INC(udps_nosum);
>> +               } else {
>> +                       /* UDPLite requires a checksum */
>> +                       /* XXX: What is the right UDPLite MIB counter =
here? */
>> +                       m_freem(m);
>> +                       return (IPPROTO_DONE);
>> +               }
>> +       }
>>=20
>>        pcbinfo =3D get_inpcbinfo(proto);
>>        if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr)) ||
>>=20
>=20
>=20




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A8FE3A2-B085-4EBC-8E3E-F5A91129EEDE>