19668629 proftpd doesn't handle IPV6_TCLASS properly s11u2-sru
authorTomas Klacko <tomas.klacko@oracle.com>
Mon, 09 Mar 2015 03:43:08 -0700
branchs11u2-sru
changeset 3929 9602e2e0f066
parent 3909 26fa7bfce987
child 3933 7958c3b86a41
19668629 proftpd doesn't handle IPV6_TCLASS properly
components/proftpd/patches/19668629.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/proftpd/patches/19668629.patch	Mon Mar 09 03:43:08 2015 -0700
@@ -0,0 +1,18 @@
+http://bugs.proftpd.org/show_bug.cgi?id=4109
+https://github.com/proftpd/proftpd/commit/0b8afb267eb6fd6acf98595a8c2812cd27ac11a0
+
+diff --git a/src/inet.c b/src/inet.c
+index f5602e0..d0a0631 100644
+--- a/src/inet.c
++++ b/src/inet.c
[email protected]@ -770,8 +770,9 @@ int pr_inet_set_proto_opts(pool *p, conn_t *c, int mss, int nodelay,
+   if (pr_netaddr_use_ipv6()) {
+     /* Only set TCLASS flags on IPv6 sockets; IPv4 sockets use TOS. */
+     if (pr_netaddr_get_family(c->local_addr) == AF_INET6) {
++      int level = ipv6_proto;
+       if (c->listen_fd != -1) {
+-        if (setsockopt(c->listen_fd, ip_level, IPV6_TCLASS, (void *) &tos,
++        if (setsockopt(c->listen_fd, level, IPV6_TCLASS, (void *) &tos,
+             sizeof(tos)) < 0) {
+           pr_log_pri(PR_LOG_NOTICE, "error setting listen fd IPV6_TCLASS: %s",
+             strerror(errno));