Don't try to apply ipfw filtering to non-IP packets.

Reported-by:	"Lachlan O'Dea" <lodea@vet.com.au>
This commit is contained in:
Archie Cobbs 2000-06-02 22:47:53 +00:00
parent 7273f8bc17
commit 756fff0053
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=61192

View file

@ -656,6 +656,8 @@ bdg_forward(struct mbuf **m0, struct ether_header *const eh, struct ifnet *dst)
goto forward ;
if (src == NULL)
goto forward ; /* do not apply to packets from ether_output */
if (ntohs(eh->ether_type) != ETHERTYPE_IP)
goto forward ; /* not an IP packet, ipfw is not appropriate */
/*
* In this section, canfree=1 means m is the same as *m0.
* canfree==0 means m is a copy. We need to make a copy here