Skip to content

Instantly share code, notes, and snippets.

@raitech
raitech / pf_nat_log_freebsd_10.2r.patch
Last active December 31, 2018 15:00
This patch alters pf (some headers and pflog interface), tcpdump, and pflogd to log more information about NAT translations (based on FreeBSD 10.2 RELEASE source), to be in accordance with Brazilian Internet's Civil Mark (Marco Civil da Internet).
diff -ru freebsd-10.2r-src-orig/contrib/pf/pflogd/pflogd.h freebsd-10.2r-src/contrib/pf/pflogd/pflogd.h
--- freebsd-10.2r-src-orig/contrib/pf/pflogd/pflogd.h 2015-08-12 11:20:57.000000000 -0300
+++ freebsd-10.2r-src/contrib/pf/pflogd/pflogd.h 2016-04-24 11:43:59.737952483 -0300
@@ -19,7 +19,7 @@
#include <sys/limits.h>
#include <pcap.h>
-#define DEF_SNAPLEN 116 /* default plus allow for larger header of pflog */
+#define DEF_SNAPLEN 160 /* default plus allow for larger header of pflog */
#define PCAP_TO_MS 500 /* pcap read timeout (ms) */
Aff… obtive as seguintes mensagens no /var/run/rc.log:
[running /etc/rc.d/xendomains]
/etc/rc.d/xendomains exited with code 1
[running /etc/rc.d/xend]
Starting xendservices: xenbackendd, xend.
Traceback (most recent call last):
File "/usr/pkg/sbin/xend", line 110, in <module>
sys.exit(main())