+ if(sk->family == AF_INET6)
+ {
+ switch(tos)
+ {
+ case 0:
+ buf = 0;
+ case SOCK_TOS_MINCOST:
+ buf = confgetint("net", "diffserv-mincost");
+ break;
+ case SOCK_TOS_MAXREL:
+ buf = confgetint("net", "diffserv-maxrel");
+ break;
+ case SOCK_TOS_MAXTP:
+ buf = confgetint("net", "diffserv-maxtp");
+ break;
+ case SOCK_TOS_MINDELAY:
+ buf = confgetint("net", "diffserv-mindelay");
+ break;
+ default:
+ flog(LOG_WARNING, "attempted to set unknown TOS value %i to IPv4 sock", tos);
+ return(-1);
+ }
+ /*
+ On Linux, the API IPv6 flow label management doesn't seem to
+ be entirely complete, so I guess this will have to wait.
+
+ if(setsockopt(...) < 0)
+ {
+ flog(LOG_WARNING, "could not set sock traffic class to %i: %s", tos, strerror(errno));
+ return(-1);
+ }
+ */
+ return(0);
+ }