Date: Wed, 13 Dec 2017 15:38:57 -0500 From: John Lyon <johnllyon@gmail.com> To: freebsd-net@freebsd.org Subject: Need Netgraph Help Message-ID: <CAKfTJoUMxo7gsio7JJD8Vj_xPgFx5YEBH3_XViFhR0dt59==Dw@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hello All, I'm a new Netgraph user, but am having some problems with a simple Netgraph script I have written. Unfortunately, the error message is cryptic and I can't tell what I am doing wrong since my script closely follows the example provided in the ng_etf man page. For some context, I'm trying to filter EAP traffic coming in on my LAN interface. Any ethernet frames that correspond to EAP traffic need to be immediately forwarded from the LAN interface to my WAN interface. All other ethernet frames coming in on my LAN interface need to be handled by the kernel's network stack. A (horrid) ASCII art representation of my desired netgraph would look like this: lower -> em0 -> downstream -> ETF -> no match -> upper em0 -> match -> lower em1 The script I have written is this: #! /bin/sh ngctl mkpeer em0: etf lower downstream ngctl name em0:lower lan_filter ngctl connect em0: lan_filter: upper nomatch ngctl msg lan_filter: setfilter { matchhook="em1:lower" ethertype=0x888e } Unfortunately, the last line of my script generates the following error message: ngctl: send msg: Invalid Argument However, I cannot tell which of my arguments is invalid. Moreover, my script does not having any glaring differences from the example script provided by the man page for the Ethernet Filter node (man ng_etf) upon which my script is based. I've been googling and googling, but there are not that many resources and very few Netgraph tutorials (most of them are copies of each other). Any help would be appreciated. Thanks in advance for any help you may be able to give. -------------------------------- John L. Lyon PGP Key Available At: https://www.dropbox.com/s/skmedtscs0tgex7/02150BFE.asc
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAKfTJoUMxo7gsio7JJD8Vj_xPgFx5YEBH3_XViFhR0dt59==Dw>