net: retire PFIL_FWD

It is now unused and not having it allows further clean ups.

Reviewed by:	cy, glebius, kp
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D36452
This commit is contained in:
Mateusz Guzik 2022-09-02 18:37:55 +02:00
parent 223a73a1c4
commit 14c9a2dbfb
5 changed files with 6 additions and 9 deletions

View File

@ -80,7 +80,7 @@ struct pfilioc_link {
#define PFIL_IN 0x00010000
#define PFIL_OUT 0x00020000
#define PFIL_FWD 0x00040000
/* UNUSED 0x00040000 */
#define PFIL_DIR(f) ((f) & (PFIL_IN|PFIL_OUT))
#define PFIL_MEMPTR 0x00080000
#define PFIL_HEADPTR 0x00100000

View File

@ -403,7 +403,7 @@ ip_tryforward(struct mbuf *m)
goto passout;
if (pfil_run_hooks(V_inet_pfil_head, &m, nh->nh_ifp,
PFIL_OUT | PFIL_FWD, NULL) != PFIL_PASS)
PFIL_OUT, NULL) != PFIL_PASS)
goto drop;
M_ASSERTVALID(m);

View File

@ -117,9 +117,6 @@ ip_output_pfil(struct mbuf **mp, struct ifnet *ifp, int flags,
struct ip *ip;
int pflags = PFIL_OUT;
if (flags & IP_FORWARDING)
pflags |= PFIL_FWD;
m = *mp;
ip = mtod(m, struct ip *);

View File

@ -214,8 +214,8 @@ ip6_tryforward(struct mbuf *m)
/*
* Outgoing packet firewall processing.
*/
if (pfil_run_hooks(V_inet6_pfil_head, &m, nh->nh_ifp, PFIL_OUT |
PFIL_FWD, NULL) != PFIL_PASS)
if (pfil_run_hooks(V_inet6_pfil_head, &m, nh->nh_ifp, PFIL_OUT,
NULL) != PFIL_PASS)
goto dropout;
/*

View File

@ -313,8 +313,8 @@ ip6_forward(struct mbuf *m, int srcrt)
odst = ip6->ip6_dst;
/* Run through list of hooks for forwarded packets. */
if (pfil_run_hooks(V_inet6_pfil_head, &m, nh->nh_ifp, PFIL_OUT |
PFIL_FWD, NULL) != PFIL_PASS)
if (pfil_run_hooks(V_inet6_pfil_head, &m, nh->nh_ifp, PFIL_OUT,
NULL) != PFIL_PASS)
goto freecopy;
ip6 = mtod(m, struct ip6_hdr *);