aboutsummaryrefslogtreecommitdiff
path: root/lib/libpfctl
Commit message (Collapse)AuthorAgeFilesLines
...
* libpfct: Fix PIC flagKristof Provost2021-04-171-1/+1
| | | | | | | | Use ${PICFLAG} rather than hard-adding -fPIC, which removes the requirement for libnv to be built PIC. MFC after: 4 weeks Sponsored by: Rubicon Communications, LLC ("Netgate")
* pfctl: Fix clearing rules countersKristof Provost2021-04-142-0/+14
| | | | | | | | | | | | After the migration to libpfctl for rule retrieval we accidentally lost support for clearing the rules counters. Introduce a get_clear variant of pfctl_get_rule() which allows rules counters to be cleared. MFC after: 4 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D29727
* pf: Implement the NAT source port selection of MAP-E Customer EdgeKurosawa Takahiro2021-04-132-0/+25
| | | | | | | | | | | MAP-E (RFC 7597) requires special care for selecting source ports in NAT operation on the Customer Edge because a part of bits of the port numbers are used by the Border Relay to distinguish another side of the IPv4-over-IPv6 tunnel. PR: 254577 Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D29468
* pfctl, libpfctl: introduce pfctl_poolKurosawa Takahiro2021-04-122-3/+13
| | | | | | | | | Introduce pfctl_pool to be able to extend the pool part of the pf rule without breaking the ABI. Reviewed by: kp MFC after: 4 weeks Differential Revision: https://reviews.freebsd.org/D29721
* libpfctl: Fix u_* countersKristof Provost2021-04-102-10/+6
| | | | | | | | | | | | | | struct pf_rule had a few counter_u64_t counters. Those couldn't be usefully comminicated with userspace, so the fields were doubled up in uint64_t u_* versions. Now that we use struct pfctl_rule (i.e. a fully userspace version) we can safely change the structure and remove this wart. Reviewed by: glebius MFC after: 4 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D29645
* libpfctl: Switch to pfctl_ruleKristof Provost2021-04-102-8/+145
| | | | | | | | | | | Stop using the kernel's struct pf_rule, switch to libpfctl's pfctl_rule. Now that we use nvlists to communicate with the kernel these structures can be fully decoupled. Reviewed by: glebius MFC after: 4 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D29644
* pfctl: Move ioctl abstraction functions into libpfctlKristof Provost2021-04-103-0/+593
Introduce a library to wrap the pf ioctl interface. MFC after: 4 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D29562