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/netinet6/in6_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/netinet6/in6_proto.c')
-rw-r--r-- | sys/netinet6/in6_proto.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/netinet6/in6_proto.c b/sys/netinet6/in6_proto.c index b0631ae..428121f 100644 --- a/sys/netinet6/in6_proto.c +++ b/sys/netinet6/in6_proto.c @@ -207,13 +207,26 @@ struct ip6protosw inet6sw[] = { .pr_protocol = IPPROTO_SCTP, .pr_flags = PR_WANTRCVD, .pr_input = sctp6_input, - .pr_ctlinput = sctp6_ctlinput, + .pr_ctlinput = sctp6_ctlinput, .pr_ctloutput = sctp_ctloutput, .pr_drain = sctp_drain, .pr_usrreqs = &sctp6_usrreqs }, #endif /* SCTP */ { + .pr_type = SOCK_DGRAM, + .pr_domain = &inet6domain, + .pr_protocol = IPPROTO_UDPLITE, + .pr_flags = PR_ATOMIC|PR_ADDR, + .pr_input = udp6_input, + .pr_ctlinput = udplite6_ctlinput, + .pr_ctloutput = udp_ctloutput, +#ifndef INET /* Do not call initialization twice. */ + .pr_init = udplite_init, +#endif + .pr_usrreqs = &udp6_usrreqs, +}, +{ .pr_type = SOCK_RAW, .pr_domain = &inet6domain, .pr_protocol = IPPROTO_RAW, |