Severall mpath bugfixes: *) if mpath is enabled, the interface loopbackroute could not be deleted (introduced SVN rev 226241) *) route selection crashes when 3 mpath routes are installed and deleted: 1: route to gw1 weight 3 2: roote to gw2 weight 2 3: interface route metric 1 and deleted in 2-1 order (already freed rm_leaf returned) *) added correct mpath selection on interface-routes (in_lltable_rtcheck) *) added mpath to fastforward *) do correct equal cost mpath route selection based on weight (rtalloc_mpath_fib_flags) Fix: Patch attached with submission follows: How-To-Repeat: Mpath test-script: em0: interface must be up em3: up and there must be a pingable host with 10.11.11.1/24 Routingtable have to be the same before and after running the script. #!/bin/sh ifconfig em0 192.168.2.100/24 read "Press [Enter] key" ifconfig em3 alias 10.11.11.175/24 > /dev/null ping -t1 -c 1 10.11.11.1 > /dev/null if [ "$?" -ne "0" ]; then echo test1 failed else echo test1 ok fi read "Press [Enter] key" route add 10.11.11.0/24 192.168.2.1 -weight 2 > /dev/null ping -t 1 -c 1 10.11.11.1 > /dev/null if [ "$?" -ne "0" ]; then echo test2 failed else echo test2 ok fi read "Press [Enter] key" route add 10.11.11.0/24 192.168.2.3 -weight 3 > /dev/null ping -c 1 10.11.11.1 > /dev/null if [ "$?" -ne "0" ]; then echo test3 failed else echo test3 ok fi read "Press [Enter] key" route delete 10.11.11.0/24 192.168.2.1 > /dev/null ping -t 1 -c 1 10.11.11.1 > /dev/null if [ "$?" -ne "0" ]; then echo test4 failed else echo test4 ok fi read "Press [Enter] key" route delete 10.11.11.0/24 192.168.2.3 > /dev/null ping -t 1 -c 1 10.11.11.1 > /dev/null if [ "$?" -ne "0" ]; then echo test5 failed else echo test5 ok fi read "Press [Enter] key" ifconfig em3 -alias 10.11.11.175 > /dev/null ping -t 1 -c 1 10.11.11.1 > /dev/null if [ "$?" -ne "0" ]; then echo test6 ok else echo test6 failed fi read "Press [Enter] key" route add 10.11.11.0/24 192.168.2.1 -weight 2 > /dev/null ping -t 1 -c 1 10.11.11.1 > /dev/null if [ "$?" -ne "0" ]; then echo test7 ok else echo test7 failed fi read "Press [Enter] key" ifconfig em3 alias 10.11.11.175/24 > /dev/null ping -t 1 -c 1 10.11.11.1 > /dev/null if [ "$?" -ne "0" ]; then echo test8 failed else echo test8 ok fi read "Press [Enter] key" route add 10.11.11.0/24 192.168.2.3 -weight 3 > /dev/null ping -t 1 -c 1 10.11.11.1 > /dev/null if [ "$?" -ne "0" ]; then echo test9 failed else echo test9 ok fi read "Press [Enter] key" ifconfig em3 -alias 10.11.11.175 > /dev/null ping -t 1 -c 1 10.11.11.1 > /dev/null if [ "$?" -ne "0" ]; then echo test10 ok else echo test10 failed fi read "Press [Enter] key" route delete 10.11.11.0/24 192.168.2.1 > /dev/null ping -t 1 -c 1 10.11.11.1 > /dev/null if [ "$?" -ne "0" ]; then echo test11 ok else echo test11 failed fi read "Press [Enter] key" route delete 10.11.11.0/24 192.168.2.3 > /dev/null ping -t 1 -c 1 10.11.11.1 > /dev/null if [ "$?" -ne "0" ]; then echo test12 ok else echo test12 failed fi read "Press [Enter] key" route add 10.11.11.0/24 192.168.2.1 -weight 2 > /dev/null ping -t 1 -c 1 10.11.11.1 > /dev/null if [ "$?" -ne "0" ]; then echo test13 ok else echo test13 failed fi read "Press [Enter] key" route add 10.11.11.0/24 192.168.2.3 -weight 3 > /dev/null ping -t 1 -c 1 10.11.11.1 > /dev/null if [ "$?" -ne "0" ]; then echo test14 ok else echo test14 failed fi read "Press [Enter] key" ifconfig em3 alias 10.11.11.175/24 > /dev/null ping -t 1 -c 1 10.11.11.1 > /dev/null if [ "$?" -ne "0" ]; then echo test15 failed else echo test15 ok fi read "Press [Enter] key" route delete 10.11.11.0/24 192.168.2.3 > /dev/null ping -t 1 -c 1 10.11.11.1 > /dev/null if [ "$?" -ne "0" ]; then echo test16 failed else echo test16 ok fi read "Press [Enter] key" route delete 10.11.11.0/24 192.168.2.1 > /dev/null ping -t 1 -c 1 10.11.11.1 > /dev/null if [ "$?" -ne "0" ]; then echo test17 failed else echo test17 ok fi read "Press [Enter] key" ifconfig em3 -alias 10.11.11.175 > /dev/null ping -t 1 -c 1 10.11.11.1 > /dev/null if [ "$?" -ne "0" ]; then echo test18 ok else echo test18 failed fi
this part is also needed:
Hi all, Is there any reason for this patch is not included in FreeBSD 10? Thanks and best regards, Gondim
For bugs matching the following conditions: - Status == In Progress - Assignee == "bugs@FreeBSD.org" - Last Modified Year <= 2017 Do - Set Status to "Open"