• Tom Herbert's avatar
    ipv6: Change "final" protocol processing for encapsulation · 1da44f9c
    Tom Herbert authored
    When performing foo-over-UDP, UDP packets are processed by the
    encapsulation handler which returns another protocol to process.
    This may result in processing two (or more) protocols in the
    loop that are marked as INET6_PROTO_FINAL. The actions taken
    for hitting a final protocol, in particular the skb_postpull_rcsum
    can only be performed once.
    
    This patch set adds a check of a final protocol has been seen. The
    rules are:
      - If the final protocol has not been seen any protocol is processed
        (final and non-final). In the case of a final protocol, the final
        actions are taken (like the skb_postpull_rcsum)
      - If a final protocol has been seen (e.g. an encapsulating UDP
        header) then no further non-final protocols are allowed
        (e.g. extension headers). For more final protocols the
        final actions are not taken (e.g. skb_postpull_rcsum).
    Signed-off-by: default avatarTom Herbert <tom@herbertland.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    1da44f9c
ip6_input.c 9.96 KB