diff options
author | julian <julian@FreeBSD.org> | 2004-06-26 22:24:16 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2004-06-26 22:24:16 +0000 |
commit | 5a269c8a7e26638b8f896d1601618e5253776958 (patch) | |
tree | 5db990cf15727892f404908f26b492b9f1b8a509 /sys/netgraph/ng_ether.c | |
parent | cb255821c823542b64070fb2864196922202a027 (diff) | |
download | FreeBSD-src-5a269c8a7e26638b8f896d1601618e5253776958.zip FreeBSD-src-5a269c8a7e26638b8f896d1601618e5253776958.tar.gz |
Having moved metadata usage to mbuf tags, remove code that supports
the old way of doing it.
Submitted by: Gleb Smirnoff <glebius@cell.sick.ru>
Diffstat (limited to 'sys/netgraph/ng_ether.c')
-rw-r--r-- | sys/netgraph/ng_ether.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/sys/netgraph/ng_ether.c b/sys/netgraph/ng_ether.c index 9b95d6a..8d9b765 100644 --- a/sys/netgraph/ng_ether.c +++ b/sys/netgraph/ng_ether.c @@ -94,8 +94,8 @@ static void ng_ether_attach(struct ifnet *ifp); static void ng_ether_detach(struct ifnet *ifp); /* Other functions */ -static int ng_ether_rcv_lower(node_p node, struct mbuf *m, meta_p meta); -static int ng_ether_rcv_upper(node_p node, struct mbuf *m, meta_p meta); +static int ng_ether_rcv_lower(node_p node, struct mbuf *m); +static int ng_ether_rcv_upper(node_p node, struct mbuf *m); /* Netgraph node methods */ static ng_constructor_t ng_ether_constructor; @@ -485,15 +485,14 @@ ng_ether_rcvdata(hook_p hook, item_p item) const node_p node = NG_HOOK_NODE(hook); const priv_p priv = NG_NODE_PRIVATE(node); struct mbuf *m; - meta_p meta; NGI_GET_M(item, m); - NGI_GET_META(item, meta); NG_FREE_ITEM(item); + if (hook == priv->lower || hook == priv->orphan) - return ng_ether_rcv_lower(node, m, meta); + return ng_ether_rcv_lower(node, m); if (hook == priv->upper) - return ng_ether_rcv_upper(node, m, meta); + return ng_ether_rcv_upper(node, m); panic("%s: weird hook", __func__); #ifdef RESTARTABLE_PANICS /* so we don't get an error msg in LINT */ return NULL; @@ -504,14 +503,11 @@ ng_ether_rcvdata(hook_p hook, item_p item) * Handle an mbuf received on the "lower" or "orphan" hook. */ static int -ng_ether_rcv_lower(node_p node, struct mbuf *m, meta_p meta) +ng_ether_rcv_lower(node_p node, struct mbuf *m) { const priv_p priv = NG_NODE_PRIVATE(node); struct ifnet *const ifp = priv->ifp; - /* Discard meta info */ - NG_FREE_META(meta); - /* Check whether interface is ready for packets */ if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING)) { NG_FREE_M(m); @@ -549,13 +545,10 @@ ng_ether_rcv_lower(node_p node, struct mbuf *m, meta_p meta) * Handle an mbuf received on the "upper" hook. */ static int -ng_ether_rcv_upper(node_p node, struct mbuf *m, meta_p meta) +ng_ether_rcv_upper(node_p node, struct mbuf *m) { const priv_p priv = NG_NODE_PRIVATE(node); - /* Discard meta info */ - NG_FREE_META(meta); - m->m_pkthdr.rcvif = priv->ifp; /* Route packet back in */ |