mirror of
https://github.com/opnsense/src.git
synced 2026-02-20 16:30:53 -05:00
have already done this, so I have styled the patch on their work:
1) introduce a ip_newid() static inline function that checks
the sysctl and then decides if it should return a sequential
or random IP ID.
2) named the sysctl net.inet.ip.random_id
3) IPv6 flow IDs and fragment IDs are now always random.
Flow IDs and frag IDs are significantly less common in the
IPv6 world (ie. rarely generated per-packet), so there should
be smaller performance concerns.
The sysctl defaults to 0 (sequential IP IDs).
Reviewed by: andre, silby, mlaier, ume
Based on: NetBSD
MFC after: 2 months
32 lines
647 B
Makefile
32 lines
647 B
Makefile
# $FreeBSD$
|
|
|
|
.PATH: ${.CURDIR}/../../contrib/pf/net
|
|
.PATH: ${.CURDIR}/../../contrib/pf/netinet
|
|
.PATH: ${.CURDIR}/../../netinet
|
|
|
|
KMOD= pf
|
|
SRCS = pf.c pf_if.c pf_subr.c pf_osfp.c pf_ioctl.c pf_norm.c pf_table.c \
|
|
if_pflog.c \
|
|
in4_cksum.c \
|
|
opt_pf.h opt_inet.h opt_inet6.h opt_bpf.h
|
|
|
|
CFLAGS+= -Wall -I${.CURDIR}/../../contrib/pf
|
|
|
|
opt_pf.h:
|
|
echo "#define DEV_PF 1" > opt_pf.h
|
|
echo "#define DEV_PFLOG 1" >> opt_pf.h
|
|
|
|
opt_inet.h:
|
|
echo "#define INET 1" > opt_inet.h
|
|
|
|
opt_inet6.h:
|
|
.if defined(NOINET6)
|
|
echo > opt_inet6.h
|
|
.else
|
|
echo "#define INET6 1" > opt_inet6.h
|
|
.endif
|
|
|
|
opt_bpf.h:
|
|
echo "#define DEV_BPF 1" > opt_bpf.h
|
|
|
|
.include <bsd.kmod.mk>
|