Date: Sun, 22 Dec 2002 02:01:08 -0500 From: Hiten Pandya <hiten@unixdaemons.com> To: Attila Nagy <bra@fsn.hu> Cc: hackers@FreeBSD.org Subject: Re: FEC doesn't build on 5.0 Message-ID: <20021222070108.GA80520@unixdaemons.com>
next in thread | raw e-mail | index | archive | help
--FCuugMFkClbJLl1L Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > Hello > > Heither of the original (http://people.freebsd.org/~wpaul/FEC/) not > the in tree FEC implementations build. Hi there. The reason it doesn't build is because, the ng_fec was somehow left out when Sam Leffler was making changes to the ether_if{de,at}tach() and bpf interfaces. Anyway, a complete fix, which should be committed is attached with this mail. Also, I believe you have used the implementation from wpaul's website. Could you try using the `in-tree' version of the FEC Netgraph driver, because many of the ifnet_addrs* related problems have been resolved in it by julian@. Cheers. -- Hiten Pandya (hiten@unixdaemons.com, hiten@uk.FreeBSD.org) http://www.unixdaemons.com/~hiten/ --FCuugMFkClbJLl1L Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="netgraph+ng_fec-various.patch" Index: netgraph/ng_fec.c =================================================================== RCS file: /home/hiten/ncvs/src/sys/netgraph/ng_fec.c,v retrieving revision 1.2 diff -u -r1.2 ng_fec.c --- netgraph/ng_fec.c 1 Nov 2002 23:09:15 -0000 1.2 +++ netgraph/ng_fec.c 21 Dec 2002 22:34:27 -0000 @@ -188,6 +188,10 @@ static void ng_fec_print_ioctl(struct ifnet *ifp, int cmd, caddr_t data); #endif +/* ng_ether_input_p - see sys/netgraph/ng_ether.c */ +extern void (*ng_ether_input_p)(struct ifnet *ifp, struct mbuf **mp, + struct ether_header *eh); + /* Netgraph methods */ static ng_constructor_t ng_fec_constructor; static ng_rcvmsg_t ng_fec_rcvmsg; @@ -760,7 +764,7 @@ mh.mh_next = m; mh.mh_data = (char *)eh; mh.mh_len = ETHER_HDR_LEN; - bpf_mtap(bifp, (struct mbuf *)&mh); + BPF_MTAP(bifp, (struct mbuf *)&mh); } return; @@ -977,8 +981,7 @@ if (m0 == NULL) return; - if (ifp->if_bpf) - bpf_mtap(ifp, m0); + BPF_MTAP(ifp, m0); /* Queue up packet on the proper port. */ error = ng_fec_choose_port(b, m0, &oifp); @@ -1097,7 +1100,7 @@ ng_ether_input_p = ng_fec_input; /* Attach the interface */ - ether_ifattach(ifp, ETHER_BPF_SUPPORTED); + ether_ifattach(ifp, priv->arpcom.ac_enaddr); callout_handle_init(&priv->fec_ch); TAILQ_INIT(&b->ng_fec_ports); @@ -1190,7 +1193,7 @@ if (ng_ether_input_p != NULL) ng_ether_input_p = NULL; - ether_ifdetach(&priv->arpcom.ac_if, ETHER_BPF_SUPPORTED); + ether_ifdetach(&priv->arpcom.ac_if); ifmedia_removeall(&priv->ifmedia); ng_fec_free_unit(priv->unit); FREE(priv, M_NETGRAPH); Index: modules/netgraph/fec/Makefile =================================================================== RCS file: /home/hiten/ncvs/src/sys/modules/netgraph/fec/Makefile,v retrieving revision 1.1 diff -u -r1.1 Makefile --- modules/netgraph/fec/Makefile 29 Oct 2002 19:12:44 -0000 1.1 +++ modules/netgraph/fec/Makefile 21 Dec 2002 22:57:09 -0000 @@ -4,7 +4,7 @@ SRCS= ng_fec.c opt_inet.h opt_inet6.h #MAN4= ng_fec.4 NOMAN= yes -KMODDEPS= netgraph +MODULE_DEPEND= netgraph CFLAGS += -DINET -DINET6 --FCuugMFkClbJLl1L-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021222070108.GA80520>