The ICMP redirect messages modify the kernel routing table in an undesirable way; it should be disabled from both manageability and security considerations.
The followings show some configuration command examples for different OS kernels.
sysctl net.inet.icmp.drop_redirect=1
sysctl net.ipv4.conf.all.accept_redirects=0
sysctl net.ipv6.conf.all.accept_redirects=0
ipadm set-prop -p _ignore_redirect=1 ipv4
ipadm set-prop -p _ignore_redirect=1 ipv6
echo "_rtredirect/W 01040000" | adb -k -w /vmunix /dev/mem
sysctl net.inet.ip.redirect=0
sysctl net.inet6.ip6.redirect=0
sysctl net.ipv4.conf.all.send_redirects=0
ipadm set-prop -p _send_redirects=0 ipv4
ipadm set-prop -p _send_redirects=0 ipv6