• Herbert Xu's avatar
    xfrm: Remove inner/outer modes from input path · 5f24f41e
    Herbert Xu authored
    The inner/outer modes were added to abstract out common code that
    were once duplicated between IPv4 and IPv6.  As time went on the
    abstractions have been removed and we are now left with empty
    shells that only contain duplicate information.  These can be
    removed one-by-one as the same information is already present
    elsewhere in the xfrm_state object.
    
    Removing them from the input path actually allows certain valid
    combinations that are currently disallowed.  In particular, when
    a transport mode SA sits beneath a tunnel mode SA that changes
    address families, at present the transport mode SA cannot have
    AF_UNSPEC as its selector because it will be erroneously be treated
    as inter-family itself even though it simply sits beneath one.
    
    This is a serious problem because you can't set the selector to
    non-AF_UNSPEC either as that will cause the selector match to
    fail as we always match selectors to the inner-most traffic.
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
    5f24f41e
xfrm_input.c 18.5 KB