Replace m_pkthdr.rcvif with oif when oif is not NULL, to count

icmp6 error statistics based on sending interface.
This also prevent kernel panic when rcvif is not initialized after M_PKTHDR().
(The initialization issue also need to be fixed in the future.)

Approved by: jkh

Submitted by: k-sugyou@kame.net
This commit is contained in:
Yoshinobu Inoue 2000-03-11 20:03:22 +00:00
parent 19a938aa3d
commit 8fca8c97c6

View file

@ -738,6 +738,8 @@ got_match:
break;
}
default: /* Send an ICMP unreachable using code */
if (oif)
(*m)->m_pkthdr.rcvif = oif;
icmp6_error(*m, ICMP6_DST_UNREACH,
rule->fw_reject_code, 0);
*m = NULL;