diff options
author | loos <loos@FreeBSD.org> | 2016-11-15 01:20:36 +0000 |
---|---|---|
committer | Luiz Souza <luiz@netgate.com> | 2017-07-15 11:06:42 -0500 |
commit | b3f0d55157da0bf8daaa07dc7e85ff3b2e331488 (patch) | |
tree | 09b5b4fc751760385d21ee4fc193878bb81ac71b | |
parent | f25f84e7a008fdb5fd0792791dfcb1c933acc9db (diff) | |
download | FreeBSD-src-b3f0d55157da0bf8daaa07dc7e85ff3b2e331488.zip FreeBSD-src-b3f0d55157da0bf8daaa07dc7e85ff3b2e331488.tar.gz |
Stop abusing from struct ifnet presence to determine the packet direction
for dummynet, use the correct argument for that, remove the false coment
about the presence of struct ifnet.
Fixes the input match of dummynet l2 rules.
Obtained from: pfSense
Sponsored by: Rubicon Communications, LLC (Netgate)
(cherry picked from commit 3a397c8fa4ebd59794e6e0d775ee15b42b7b30ee)
-rw-r--r-- | sys/netpfil/ipfw/ip_fw_pfil.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/netpfil/ipfw/ip_fw_pfil.c b/sys/netpfil/ipfw/ip_fw_pfil.c index ae08a04..cf03695 100644 --- a/sys/netpfil/ipfw/ip_fw_pfil.c +++ b/sys/netpfil/ipfw/ip_fw_pfil.c @@ -306,11 +306,9 @@ again: /* * ipfw processing for ethernet packets (in and out). - * Inteface is NULL from ether_demux, and ifp from - * ether_output_frame. */ int -ipfw_check_frame(void *arg, struct mbuf **m0, struct ifnet *dst, int dir, +ipfw_check_frame(void *arg, struct mbuf **m0, struct ifnet *ifp, int dir, struct inpcb *inp) { struct ether_header *eh; @@ -346,7 +344,7 @@ ipfw_check_frame(void *arg, struct mbuf **m0, struct ifnet *dst, int dir, m_adj(m, ETHER_HDR_LEN); /* strip ethernet header */ args.m = m; /* the packet we are looking at */ - args.oif = dir == PFIL_OUT ? dst: NULL; /* destination, if any */ + args.oif = dir == PFIL_OUT ? ifp: NULL; /* destination, if any */ args.next_hop = NULL; /* we do not support forward yet */ args.next_hop6 = NULL; /* we do not support forward yet */ args.eh = &save_eh; /* MAC header for bridged/MAC packets */ |