diff options
author | shin <shin@FreeBSD.org> | 2000-03-11 20:03:22 +0000 |
---|---|---|
committer | shin <shin@FreeBSD.org> | 2000-03-11 20:03:22 +0000 |
commit | 3ca445ef55950f966bd5dfb2859dbe63d4d8b9f5 (patch) | |
tree | 959fd7796919832475285cfb3e97fb06a64d363a /sys | |
parent | 282ee285816797c45c9c7a1663f63fea4ab18566 (diff) | |
download | FreeBSD-src-3ca445ef55950f966bd5dfb2859dbe63d4d8b9f5.zip FreeBSD-src-3ca445ef55950f966bd5dfb2859dbe63d4d8b9f5.tar.gz |
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
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet6/ip6_fw.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/netinet6/ip6_fw.c b/sys/netinet6/ip6_fw.c index 8fa5838..d6b4ca2 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; |