• Paolo Abeni's avatar
    mptcp: strict local address ID selection · 4cf86ae8
    Paolo Abeni authored
    The address ID selection for MPJ subflows created in response
    to incoming ADD_ADDR option is currently unreliable: it happens
    at MPJ socket creation time, when the local address could be
    unknown.
    
    Additionally, if the no local endpoint is available for the local
    address, a new dummy endpoint is created, confusing the user-land.
    
    This change refactor the code to move the address ID selection inside
    the rebuild_header() helper, when the local address eventually
    selected by the route lookup is finally known. If the address used
    is not mapped by any endpoint - and thus can't be advertised/removed
    pick the id 0 instead of allocate a new endpoint.
    Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
    Signed-off-by: default avatarMat Martineau <mathew.j.martineau@linux.intel.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    4cf86ae8
protocol.c 94.1 KB