diff options
author | kevlo <kevlo@FreeBSD.org> | 2014-05-13 06:05:53 +0000 |
---|---|---|
committer | kevlo <kevlo@FreeBSD.org> | 2014-05-13 06:05:53 +0000 |
commit | 69da76e9e5a9758fee9f8286827143e4608bb87a (patch) | |
tree | 9eae681ae0fb7e2b696040fefa6df9b3b66c7360 /sys/netinet/in_proto.c | |
parent | ab793415d02166fdd7cfea2301a03a903362e3f9 (diff) | |
download | FreeBSD-src-69da76e9e5a9758fee9f8286827143e4608bb87a.zip FreeBSD-src-69da76e9e5a9758fee9f8286827143e4608bb87a.tar.gz |
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.
Diffstat (limited to 'sys/netinet/in_proto.c')
-rw-r--r-- | sys/netinet/in_proto.c | 14 |
1 files changed, 14 insertions, 0 deletions
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, |