diff --git a/doc/configuration.txt b/doc/configuration.txt index dddb07e6b1..675bb8e5e6 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -2803,7 +2803,8 @@ http-request { allow | deny | tarpit | auth [realm ] | redirect | http-response { allow | deny | add-header | set-nice | set-header | set-log-level | - set-mark } [ { if | unless } ] + set-mark | set-tos } + [ { if | unless } ] Access control for Layer 7 responses May be used in sections: defaults | frontend | listen | backend diff --git a/src/proto_http.c b/src/proto_http.c index 8d9844011e..d21bd8a4e1 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -3213,7 +3213,7 @@ http_req_get_intercept_rule(struct proxy *px, struct list *rules, struct session case HTTP_REQ_ACT_SET_TOS: #ifdef IP_TOS - if (s->req->prod->conn->addr.to.ss_family == AF_INET) + if (s->req->prod->conn->addr.from.ss_family == AF_INET) setsockopt(s->req->prod->conn->t.sock.fd, IPPROTO_IP, IP_TOS, &rule->arg.tos, sizeof(rule->arg.tos)); #endif break; @@ -3299,7 +3299,7 @@ http_res_get_intercept_rule(struct proxy *px, struct list *rules, struct session case HTTP_RES_ACT_SET_TOS: #ifdef IP_TOS - if (s->req->prod->conn->addr.to.ss_family == AF_INET) + if (s->req->prod->conn->addr.from.ss_family == AF_INET) setsockopt(s->req->prod->conn->t.sock.fd, IPPROTO_IP, IP_TOS, &rule->arg.tos, sizeof(rule->arg.tos)); #endif break;