Backport connection_dir_buf_add() to 0.3.4 and later
We need connection_dir_buf_add() in 0.3.4 for legacy/trac#21377 (moved).
But I don't want to backport all the refactoring, just the new function.
We need connection_dir_buf_add() in 0.3.4 for legacy/trac#21377 (moved).
But I don't want to backport all the refactoring, just the new function.