Page MenuHomeFreeBSD

D56616.diff
No OneTemporary

D56616.diff

diff --git a/sys/netinet/ip_fw.h b/sys/netinet/ip_fw.h
--- a/sys/netinet/ip_fw.h
+++ b/sys/netinet/ip_fw.h
@@ -78,6 +78,7 @@
#define IP_FW3_OPVER_0 0
#define IP_FW3_OPVER_1 1 /* 32bit rulenum */
#define IP_FW3_OPVER IP_FW3_OPVER_1
+#define IP_FW_KBIVER 1500034
/* IP_FW3 opcodes */
#define IP_FW_TABLE_XADD 86 /* add entry */
diff --git a/sys/netpfil/ipfw/ip_fw_sockopt.c b/sys/netpfil/ipfw/ip_fw_sockopt.c
--- a/sys/netpfil/ipfw/ip_fw_sockopt.c
+++ b/sys/netpfil/ipfw/ip_fw_sockopt.c
@@ -170,6 +170,26 @@
VNET_DEFINE_STATIC(uma_zone_t, ipfw_cntr_zone);
#define V_ipfw_cntr_zone VNET(ipfw_cntr_zone)
+#ifdef SYSCTL_NODE
+
+SYSBEGIN(f5)
+
+/*
+ * KBI version is similar to osreldate representing the Kernel release date
+ * when the last change in KBI was made.
+ *
+ * Used in /sbin/ipfw to detect a KBI change and execve() into a KBI-compatible
+ * binary.
+ */
+
+SYSCTL_DECL(_net_inet_ip_fw);
+SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, kbi_version, CTLFLAG_RD,
+ SYSCTL_NULL_INT_PTR, IP_FW_KBIVER, "KBI version");
+
+SYSEND
+
+#endif /* SYSCTL_NODE */
+
void
ipfw_init_counters(void)
{

File Metadata

Mime Type
text/plain
Expires
Sat, Apr 25, 2:37 PM (8 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32130127
Default Alt Text
D56616.diff (1 KB)

Event Timeline