Date: Wed, 30 Oct 2002 16:20:03 -0800 (PST) From: Andriy Gapon <avg@icyb.net.ua> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/44417: ipfw layer2 rules are not checked for ether_output_frame() on bridged interface Message-ID: <200210310020.g9V0K33c022081@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/44417; it has been noted by GNATS.
From: Andriy Gapon <avg@icyb.net.ua>
To: Luigi Rizzo <rizzo@icir.org>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG, freebsd-ipfw@FreeBSD.ORG
Subject: Re: kern/44417: ipfw layer2 rules are not checked for
ether_output_frame() on bridged interface
Date: Wed, 30 Oct 2002 19:07:17 -0500 (EST)
sorry, sent that patch before even trying to compile it.
of course it should be:
391,406d390
< if (rule) /* packet was already bridged */
< goto no_bridge;
<
< if (BDG_ACTIVE(ifp) ) {
< struct ether_header *eh; /* a ptr suffices */
<
< m->m_pkthdr.rcvif = NULL;
< eh = mtod(m, struct ether_header *);
< m_adj(m, ETHER_HDR_LEN);
< m = bdg_forward_ptr(m, eh, ifp);
< if (m != NULL)
< m_freem(m);
< return (0);
< }
<
< no_bridge:
432a417,429
> }
>
> if (BDG_ACTIVE(ifp) ) {
> struct ether_header *eh; /* a ptr suffices */
>
> splx(s); /* XXX */
> m->m_pkthdr.rcvif = NULL;
> eh = mtod(m, struct ether_header *);
> m_adj(m, ETHER_HDR_LEN);
> m = bdg_forward_ptr(m, eh, ifp);
> if (m != NULL)
> m_freem(m);
> return (0);
damn C++ :-)
Btw, could you please educate me a little bit about this splXXX() stuff ?
I've tried to understand it from man page, but failed...
What purpose does it serve here ? Is this like some kind of locking ?
Is it ok that there are return statements after ether_ipfw_chk() call in
ether_output_frame() without splx(s) ?
Thank you!
--
Andriy Gapon
*
"The worst part of communication is the illusion that it has
actually occurred". M. Jenkins.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210310020.g9V0K33c022081>
