Here’s how Linux kernel 3.1.2 handles ICMP Redirect message.
First, the kernel checks the handler table and invoke
icmp_redirect as the corresponding handler of ICMP Redirect packet.
net/ipv4/af_inet.c we figure out the error handler of ICMP is
Here’s the function that ICMP Redirect is actually processed.
update_or_create_fnhe takes care the rest of route update procedure.