Set congestion control algorithm before synack is sent on destination

Bug #1218761 reported by Midori Kato
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Flowgrind
Fix Committed
Low
Christian Samsel

Bug Description

Hi,

I implement congestion control algorithm that needs negotiation using tcp option during three-way handshake. Because the current flowgrind doesn't set socket option before listen() on the destination, the destination socket doesn't add necessary tcp option in SYNACK. In the result, the negotiation is always failed. I avoid this issue using the following patch.

This flowgrind extension will be minor issue because most of congestion control needs no negotiation during three-way handshake except for multi-path tcp. If you think this extension is essential, please adopt to flowgrind.

diff --git a/src/destination.c b/src/destination.c
index b89ad79..b0507f2 100644
--- a/src/destination.c
+++ b/src/destination.c
@@ -114,6 +114,9 @@ static int create_listen_socket(struct _flow *flow, char *bind_addr,
        if (flow->settings.mtcp)
                set_tcp_mtcp(fd);

+ if (flow->settings.cc_alg)
+ set_congestion_control(fd, flow->settings.cc_alg);
+
        if (listen(fd, 0) < 0) {
                logging_log(LOG_ALERT, "listen failed: %s",
                            strerror(errno));

Revision history for this message
Christian Samsel (oxygenx) wrote :

Hi Midori,

Patch looks reasonable. If you going to supply more patches maybe you could create a github account and do pull requests? this way it is easier to add the patches and you will credibility for the patches.

regards, Christian

Changed in flowgrind:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Christian Samsel (oxygenx) wrote :

committed

Changed in flowgrind:
status: Confirmed → Fix Committed
assignee: nobody → Christian Samsel (oxygenx)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.