From 69da76e9e5a9758fee9f8286827143e4608bb87a Mon Sep 17 00:00:00 2001 From: kevlo Date: Tue, 13 May 2014 06:05:53 +0000 Subject: MFC r264212,r264213,r264248,r265776,r265811,r265909: - Add support for UDP-Lite protocol (RFC 3828) to IPv4 and IPv6 stacks. Tested with vlc and a test suite [1]. [1] http://www.erg.abdn.ac.uk/~gerrit/udp-lite/files/udplite_linux.tar.gz Reviewed by: jhb, glebius, adrian - Fix a logic bug which prevented the sending of UDP packet with 0 checksum. - Disable TX checksum offload for UDP-Lite completely. It wasn't used for partial checksum coverage, but even for full checksum coverage it doesn't work. --- sys/netinet/in_proto.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'sys/netinet/in_proto.c') diff --git a/sys/netinet/in_proto.c b/sys/netinet/in_proto.c index b7dc82a..3878b3c 100644 --- a/sys/netinet/in_proto.c +++ b/sys/netinet/in_proto.c @@ -184,6 +184,20 @@ struct protosw inetsw[] = { }, #endif /* SCTP */ { + .pr_type = SOCK_DGRAM, + .pr_domain = &inetdomain, + .pr_protocol = IPPROTO_UDPLITE, + .pr_flags = PR_ATOMIC|PR_ADDR, + .pr_input = udp_input, + .pr_ctlinput = udplite_ctlinput, + .pr_ctloutput = udp_ctloutput, + .pr_init = udplite_init, +#ifdef VIMAGE + .pr_destroy = udplite_destroy, +#endif + .pr_usrreqs = &udp_usrreqs +}, +{ .pr_type = SOCK_RAW, .pr_domain = &inetdomain, .pr_protocol = IPPROTO_RAW, -- cgit v1.1