• Ilia Sotnikov's avatar
    [IPV4]: Aggregate route entries with different TOS values · cef2685e
    Ilia Sotnikov authored
    When we get an ICMP need-to-frag message, the original TOS value in the
    ICMP payload cannot be used as a key to look up the routes to update.
    This is because the TOS field may have been modified by routers on the
    way.  Similarly, ip_rt_redirect should also ignore the TOS as the router
    that gave us the message may have modified the TOS value.
    
    The patch achieves this objective by aggregating entries with different
    TOS values (but are otherwise identical) into the same bucket.  This
    makes it easy to update them at the same time when an ICMP message is
    received.
    
    In future we should use a twin-hashing scheme where teh aggregation
    occurs at the entry level.  That is, the TOS goes back into the hash
    for normal lookups while ICMP lookups will end up with a node that
    gives us a list that contains all other route entries that differ
    only by TOS.
    Signed-off-by: default avatarIlia Sotnikov <hostcc@gmail.com>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    cef2685e
icmp.c 28.1 KB