components/proftpd/patches/009.19668629.patch
author Petr Nyc <Petr.Nyc@Oracle.COM>
Thu, 21 May 2015 12:36:22 -0700
branchs11u2-sru
changeset 4338 5df7ab8973f7
parent 4311 3a33895438c9
permissions -rw-r--r--
Added tag 0.175.2.11.0.3.0, S11.2SRU11.3 for changeset d41da420714b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3929
9602e2e0f066 19668629 proftpd doesn't handle IPV6_TCLASS properly
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
     1
http://bugs.proftpd.org/show_bug.cgi?id=4109
9602e2e0f066 19668629 proftpd doesn't handle IPV6_TCLASS properly
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
     2
https://github.com/proftpd/proftpd/commit/0b8afb267eb6fd6acf98595a8c2812cd27ac11a0
9602e2e0f066 19668629 proftpd doesn't handle IPV6_TCLASS properly
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
     3
9602e2e0f066 19668629 proftpd doesn't handle IPV6_TCLASS properly
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
     4
diff --git a/src/inet.c b/src/inet.c
9602e2e0f066 19668629 proftpd doesn't handle IPV6_TCLASS properly
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
     5
index f5602e0..d0a0631 100644
9602e2e0f066 19668629 proftpd doesn't handle IPV6_TCLASS properly
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
     6
--- a/src/inet.c
9602e2e0f066 19668629 proftpd doesn't handle IPV6_TCLASS properly
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
     7
+++ b/src/inet.c
9602e2e0f066 19668629 proftpd doesn't handle IPV6_TCLASS properly
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
     8
@@ -770,8 +770,9 @@ int pr_inet_set_proto_opts(pool *p, conn_t *c, int mss, int nodelay,
9602e2e0f066 19668629 proftpd doesn't handle IPV6_TCLASS properly
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
     9
   if (pr_netaddr_use_ipv6()) {
9602e2e0f066 19668629 proftpd doesn't handle IPV6_TCLASS properly
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    10
     /* Only set TCLASS flags on IPv6 sockets; IPv4 sockets use TOS. */
9602e2e0f066 19668629 proftpd doesn't handle IPV6_TCLASS properly
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    11
     if (pr_netaddr_get_family(c->local_addr) == AF_INET6) {
9602e2e0f066 19668629 proftpd doesn't handle IPV6_TCLASS properly
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    12
+      int level = ipv6_proto;
9602e2e0f066 19668629 proftpd doesn't handle IPV6_TCLASS properly
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    13
       if (c->listen_fd != -1) {
9602e2e0f066 19668629 proftpd doesn't handle IPV6_TCLASS properly
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    14
-        if (setsockopt(c->listen_fd, ip_level, IPV6_TCLASS, (void *) &tos,
9602e2e0f066 19668629 proftpd doesn't handle IPV6_TCLASS properly
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    15
+        if (setsockopt(c->listen_fd, level, IPV6_TCLASS, (void *) &tos,
9602e2e0f066 19668629 proftpd doesn't handle IPV6_TCLASS properly
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    16
             sizeof(tos)) < 0) {
9602e2e0f066 19668629 proftpd doesn't handle IPV6_TCLASS properly
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    17
           pr_log_pri(PR_LOG_NOTICE, "error setting listen fd IPV6_TCLASS: %s",
9602e2e0f066 19668629 proftpd doesn't handle IPV6_TCLASS properly
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    18
             strerror(errno));