Fix IPv6 regression introduced by r362900.

PR:		kern/247729
This commit is contained in:
Alexander V. Chernikov 2020-07-03 08:06:26 +00:00
parent 606007409c
commit eddfb2e86f
2 changed files with 10 additions and 2 deletions

View File

@ -2277,7 +2277,7 @@ icmp6_redirect_input(struct mbuf *m, int off)
in6_splitscope(&reddst6, &kdst, &scopeid);
NET_EPOCH_ASSERT();
nh = fib6_lookup(ifp->if_fib, &kdst, scopeid, 0, 0);
if (nh == NULL) {
if (nh != NULL) {
struct in6_addr nh_addr;
nh_addr = ifatoia6(nh->nh_ifa)->ia_addr.sin6_addr;
if ((nh->nh_flags & NHF_GATEWAY) == 0) {

View File

@ -87,7 +87,15 @@ valid_redirect_body() {
local_ll_mac=`jexec ${jname} ifconfig ${epair}b ether | awk '$1~/ether/{print$2}'`
# wait for DAD to complete
sleep 2
while [ `ifconfig ${epair}a inet6 | grep -c tentative` != "0" ]; do
sleep 0.1
done
while [ `jexec ${jname}b ifconfig ${epair}b inet6 | grep -c tentative` != "0" ]; do
sleep 0.1
done
# enable ND debugging in the target jail to ease catching errors
jexec ${jname} sysctl net.inet6.icmp6.nd6_debug=1
# echo "LOCAL: ${local_ll_ip} ${local_ll_mac}"
# echo "REMOTE: ${remote_rtr_ll_ip} ${remote_rtr_mac}"