Projet

Général

Profil

« Précédent | Suivant » 

Révision 1814ce0d

Ajouté par Ermal il y a presque 10 ans

Put the new fields before the union to avoid changin macros defining various things.

Voir les différences:

patches/stable/10/CP_speedup.diff
1 1
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c
2
index 577d644..7d82d34 100644
2
index 577d644..6a1d396 100644
3 3
--- a/sbin/ipfw/ipfw2.c
4 4
+++ b/sbin/ipfw/ipfw2.c
5 5
@@ -4115,8 +4115,9 @@ ipfw_flush(int force)
......
304 304
 
305 305
 	/*
306 306
diff --git a/sys/netinet/ip_fw.h b/sys/netinet/ip_fw.h
307
index 14b08f5..2eedd0b 100644
307
index 14b08f5..a327f1c 100644
308 308
--- a/sys/netinet/ip_fw.h
309 309
+++ b/sys/netinet/ip_fw.h
310 310
@@ -74,6 +74,8 @@ typedef struct _ip_fw3_opheader {
......
316 316
 
317 317
 /*
318 318
  * The kernel representation of ipfw rules is made of a list of
319
@@ -600,13 +602,16 @@ struct _ipfw_dyn_rule {
319
@@ -600,23 +602,43 @@ struct _ipfw_dyn_rule {
320 320
 
321 321
 #define	IPFW_TABLE_CIDR		1	/* Table for holding IPv4/IPv6 prefixes */
322 322
 #define	IPFW_TABLE_INTERFACE	2	/* Table for holding interface names */
......
334 334
 } ipfw_table_entry;
335 335
 
336 336
 typedef struct	_ipfw_table_xentry {
337
@@ -617,9 +622,26 @@ typedef struct	_ipfw_table_xentry {
337
 	uint16_t	len;		/* Total entry length		*/
338
 	uint8_t		type;		/* entry type			*/
339
 	uint8_t		masklen;	/* mask length			*/
340
-	uint16_t	tbl;		/* table number			*/
338 341
 	uint32_t	value;		/* value			*/
342
+	uint32_t               timestamp;
343
+	uint64_t		mac_addr;
344
+	uint64_t               bytes;
345
+	uint64_t               packets;
346
+	uint16_t	tbl;		/* table number			*/
339 347
 	union {
340 348
 		/* Longest field needs to be aligned by 4-byte boundary	*/
341 349
+#ifndef ETHER_ADDR_LEN
......
354 362
 		struct in6_addr	addr6;	/* IPv6 address 		*/
355 363
 		char	iface[IF_NAMESIZE];	/* interface name	*/
356 364
 	} k;
357
+	uint64_t		mac_addr;
358
+	uint64_t               bytes;
359
+	uint64_t               packets;
360
+	uint32_t               timestamp;
361
 } ipfw_table_xentry;
362
 
363
 typedef struct	_ipfw_table {
364 365
diff --git a/sys/netpfil/ipfw/ip_fw2.c b/sys/netpfil/ipfw/ip_fw2.c
365 366
index cd466bd..f2f117e 100644
366 367
--- a/sys/netpfil/ipfw/ip_fw2.c

Formats disponibles : Unified diff