Merge head code and implemente the initial support of repi send
restrictions.