if i manually modify source code and simply set tos directly. where should i add it. now I'm adding:
# tcp_proto.c, tcp_connect_server, line 513 - 514. 511 if (global.tune.server_rcvbuf) 512 setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &global.tune.server_rcvbuf, sizeof(global.tune.server_rcvbuf)); 513 int tos=0x10; 514 setsockopt(fd, IPPROTO_IP, IP_TOS, &tos, sizeof(tos)); 515 if ((connect(fd, (struct sockaddr *)&conn->addr.to, get_addr_len(&conn-> addr.to)) == -1) && is it correct? seems it works now, but i don't know if it will cause other problem. my goal is make all backend side connection have a specific TOS field. for policy routing like this: # ip route add default via 10.1.0.1 tos 0x10. Willy Tarreau <[email protected]>于2015年10月30日周五 下午4:46写道: > On Fri, Oct 30, 2015 at 08:16:07AM +0000, ??????????????? wrote: > > ohh.. i want to modify backend side... how to to it? > > It was not implemented. I noticed that the choice of action names was > rather poor because it's confusing, no side is indicated. I think in > 1.7 we'll have to rename some actions to make them more obvious, these > ones included. > > It will be a little more difficult to implement on the backend side > because the decision is taken before the connection is established > so we have to store that decision somewhere. On the frontend side it > was easy, we just find the connection's fd and perform the action > immediately. > > Willy > >

