From 8fca8c97c6a944bbabcec0cd7fc2267702d09f0f Mon Sep 17 00:00:00 2001 From: Yoshinobu Inoue Date: Sat, 11 Mar 2000 20:03:22 +0000 Subject: [PATCH] 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 --- sys/netinet6/ip6_fw.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netinet6/ip6_fw.c b/sys/netinet6/ip6_fw.c index 8fa5838d9c2..d6b4ca2960e 100644 --- a/sys/netinet6/ip6_fw.c +++ b/sys/netinet6/ip6_fw.c @@ -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;