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 /lib/libc/net | |
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 'lib/libc/net')
-rw-r--r-- | lib/libc/net/getaddrinfo.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c index 495ebc1..00ab796 100644 --- a/lib/libc/net/getaddrinfo.c +++ b/lib/libc/net/getaddrinfo.c @@ -170,12 +170,14 @@ static const struct explore explore[] = { { PF_INET6, SOCK_STREAM, IPPROTO_TCP, 0x07 }, { PF_INET6, SOCK_STREAM, IPPROTO_SCTP, 0x03 }, { PF_INET6, SOCK_SEQPACKET, IPPROTO_SCTP, 0x07 }, + { PF_INET6, SOCK_DGRAM, IPPROTO_UDPLITE, 0x03 }, { PF_INET6, SOCK_RAW, ANY, 0x05 }, #endif { PF_INET, SOCK_DGRAM, IPPROTO_UDP, 0x07 }, { PF_INET, SOCK_STREAM, IPPROTO_TCP, 0x07 }, { PF_INET, SOCK_STREAM, IPPROTO_SCTP, 0x03 }, { PF_INET, SOCK_SEQPACKET, IPPROTO_SCTP, 0x07 }, + { PF_INET, SOCK_DGRAM, IPPROTO_UDPLITE, 0x03 }, { PF_INET, SOCK_RAW, ANY, 0x05 }, { -1, 0, 0, 0 }, }; @@ -1477,6 +1479,9 @@ get_port(struct addrinfo *ai, const char *servname, int matchonly) case IPPROTO_SCTP: proto = "sctp"; break; + case IPPROTO_UDPLITE: + proto = "udplite"; + break; default: proto = NULL; break; |