Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

netfilter: ipset: Add skbinfo extension kernel support for the hash set types.

Add skbinfo extension kernel support for the hash set types.
Inroduce the new revisions of all hash set types.

Signed-off-by: Anton Danilov <littlesmilingcloud@gmail.com>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>

authored by

Anton Danilov and committed by
Jozsef Kadlecsik
af331419 39d1ecf1

+130 -25
+5
net/netfilter/ipset/ip_set_hash_gen.h
··· 720 720 ip_set_init_counter(ext_counter(data, set), ext); 721 721 if (SET_WITH_COMMENT(set)) 722 722 ip_set_init_comment(ext_comment(data, set), ext); 723 + if (SET_WITH_SKBINFO(set)) 724 + ip_set_init_skbinfo(ext_skbinfo(data, set), ext); 723 725 724 726 out: 725 727 rcu_read_unlock_bh(); ··· 799 797 if (SET_WITH_COUNTER(set)) 800 798 ip_set_update_counter(ext_counter(data, set), 801 799 ext, mext, flags); 800 + if (SET_WITH_SKBINFO(set)) 801 + ip_set_get_skbinfo(ext_skbinfo(data, set), 802 + ext, mext, flags); 802 803 return mtype_do_data_match(data); 803 804 } 804 805
+12 -2
net/netfilter/ipset/ip_set_hash_ip.c
··· 26 26 #define IPSET_TYPE_REV_MIN 0 27 27 /* 1 Counters support */ 28 28 /* 2 Comments support */ 29 - #define IPSET_TYPE_REV_MAX 3 /* Forceadd support */ 29 + /* 3 Forceadd support */ 30 + #define IPSET_TYPE_REV_MAX 4 /* skbinfo support */ 30 31 31 32 MODULE_LICENSE("GPL"); 32 33 MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>"); ··· 112 111 if (unlikely(!tb[IPSET_ATTR_IP] || 113 112 !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || 114 113 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || 115 - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES))) 114 + !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || 115 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || 116 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || 117 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) 116 118 return -IPSET_ERR_PROTOCOL; 117 119 118 120 if (tb[IPSET_ATTR_LINENO]) ··· 251 247 !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || 252 248 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || 253 249 !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || 250 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || 251 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || 252 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE) || 254 253 tb[IPSET_ATTR_IP_TO] || 255 254 tb[IPSET_ATTR_CIDR])) 256 255 return -IPSET_ERR_PROTOCOL; ··· 302 295 [IPSET_ATTR_BYTES] = { .type = NLA_U64 }, 303 296 [IPSET_ATTR_PACKETS] = { .type = NLA_U64 }, 304 297 [IPSET_ATTR_COMMENT] = { .type = NLA_NUL_STRING }, 298 + [IPSET_ATTR_SKBMARK] = { .type = NLA_U64 }, 299 + [IPSET_ATTR_SKBPRIO] = { .type = NLA_U32 }, 300 + [IPSET_ATTR_SKBQUEUE] = { .type = NLA_U16 }, 305 301 }, 306 302 .me = THIS_MODULE, 307 303 };
+12 -2
net/netfilter/ipset/ip_set_hash_ipmark.c
··· 25 25 #include <linux/netfilter/ipset/ip_set_hash.h> 26 26 27 27 #define IPSET_TYPE_REV_MIN 0 28 - #define IPSET_TYPE_REV_MAX 1 /* Forceadd support */ 28 + /* 1 Forceadd support */ 29 + #define IPSET_TYPE_REV_MAX 2 /* skbinfo support */ 29 30 30 31 MODULE_LICENSE("GPL"); 31 32 MODULE_AUTHOR("Vytas Dauksa <vytas.dauksa@smoothwall.net>"); ··· 114 113 !ip_set_attr_netorder(tb, IPSET_ATTR_MARK) || 115 114 !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || 116 115 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || 117 - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES))) 116 + !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || 117 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || 118 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || 119 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) 118 120 return -IPSET_ERR_PROTOCOL; 119 121 120 122 if (tb[IPSET_ATTR_LINENO]) ··· 248 244 !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || 249 245 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || 250 246 !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || 247 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || 248 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || 249 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE) || 251 250 tb[IPSET_ATTR_IP_TO] || 252 251 tb[IPSET_ATTR_CIDR])) 253 252 return -IPSET_ERR_PROTOCOL; ··· 308 301 [IPSET_ATTR_BYTES] = { .type = NLA_U64 }, 309 302 [IPSET_ATTR_PACKETS] = { .type = NLA_U64 }, 310 303 [IPSET_ATTR_COMMENT] = { .type = NLA_NUL_STRING }, 304 + [IPSET_ATTR_SKBMARK] = { .type = NLA_U64 }, 305 + [IPSET_ATTR_SKBPRIO] = { .type = NLA_U32 }, 306 + [IPSET_ATTR_SKBQUEUE] = { .type = NLA_U16 }, 311 307 }, 312 308 .me = THIS_MODULE, 313 309 };
+12 -2
net/netfilter/ipset/ip_set_hash_ipport.c
··· 28 28 /* 1 SCTP and UDPLITE support added */ 29 29 /* 2 Counters support added */ 30 30 /* 3 Comments support added */ 31 - #define IPSET_TYPE_REV_MAX 4 /* Forceadd support added */ 31 + /* 4 Forceadd support added */ 32 + #define IPSET_TYPE_REV_MAX 5 /* skbinfo support added */ 32 33 33 34 MODULE_LICENSE("GPL"); 34 35 MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>"); ··· 123 122 !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO) || 124 123 !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || 125 124 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || 126 - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES))) 125 + !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || 126 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || 127 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || 128 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) 127 129 return -IPSET_ERR_PROTOCOL; 128 130 129 131 if (tb[IPSET_ATTR_LINENO]) ··· 291 287 !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || 292 288 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || 293 289 !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || 290 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || 291 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || 292 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE) || 294 293 tb[IPSET_ATTR_IP_TO] || 295 294 tb[IPSET_ATTR_CIDR])) 296 295 return -IPSET_ERR_PROTOCOL; ··· 377 370 [IPSET_ATTR_BYTES] = { .type = NLA_U64 }, 378 371 [IPSET_ATTR_PACKETS] = { .type = NLA_U64 }, 379 372 [IPSET_ATTR_COMMENT] = { .type = NLA_NUL_STRING }, 373 + [IPSET_ATTR_SKBMARK] = { .type = NLA_U64 }, 374 + [IPSET_ATTR_SKBPRIO] = { .type = NLA_U32 }, 375 + [IPSET_ATTR_SKBQUEUE] = { .type = NLA_U16 }, 380 376 }, 381 377 .me = THIS_MODULE, 382 378 };
+12 -2
net/netfilter/ipset/ip_set_hash_ipportip.c
··· 28 28 /* 1 SCTP and UDPLITE support added */ 29 29 /* 2 Counters support added */ 30 30 /* 3 Comments support added */ 31 - #define IPSET_TYPE_REV_MAX 4 /* Forceadd support added */ 31 + /* 4 Forceadd support added */ 32 + #define IPSET_TYPE_REV_MAX 5 /* skbinfo support added */ 32 33 33 34 MODULE_LICENSE("GPL"); 34 35 MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>"); ··· 125 124 !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO) || 126 125 !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || 127 126 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || 128 - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES))) 127 + !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || 128 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || 129 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || 130 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) 129 131 return -IPSET_ERR_PROTOCOL; 130 132 131 133 if (tb[IPSET_ATTR_LINENO]) ··· 299 295 !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || 300 296 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || 301 297 !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || 298 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || 299 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || 300 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE) || 302 301 tb[IPSET_ATTR_IP_TO] || 303 302 tb[IPSET_ATTR_CIDR])) 304 303 return -IPSET_ERR_PROTOCOL; ··· 389 382 [IPSET_ATTR_BYTES] = { .type = NLA_U64 }, 390 383 [IPSET_ATTR_PACKETS] = { .type = NLA_U64 }, 391 384 [IPSET_ATTR_COMMENT] = { .type = NLA_NUL_STRING }, 385 + [IPSET_ATTR_SKBMARK] = { .type = NLA_U64 }, 386 + [IPSET_ATTR_SKBPRIO] = { .type = NLA_U32 }, 387 + [IPSET_ATTR_SKBQUEUE] = { .type = NLA_U16 }, 392 388 }, 393 389 .me = THIS_MODULE, 394 390 };
+12 -2
net/netfilter/ipset/ip_set_hash_ipportnet.c
··· 30 30 /* 3 nomatch flag support added */ 31 31 /* 4 Counters support added */ 32 32 /* 5 Comments support added */ 33 - #define IPSET_TYPE_REV_MAX 6 /* Forceadd support added */ 33 + /* 6 Forceadd support added */ 34 + #define IPSET_TYPE_REV_MAX 7 /* skbinfo support added */ 34 35 35 36 MODULE_LICENSE("GPL"); 36 37 MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>"); ··· 180 179 !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || 181 180 !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS) || 182 181 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || 183 - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES))) 182 + !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || 183 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || 184 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || 185 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) 184 186 return -IPSET_ERR_PROTOCOL; 185 187 186 188 if (tb[IPSET_ATTR_LINENO]) ··· 436 432 !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS) || 437 433 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || 438 434 !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || 435 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || 436 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || 437 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE) || 439 438 tb[IPSET_ATTR_IP_TO] || 440 439 tb[IPSET_ATTR_CIDR])) 441 440 return -IPSET_ERR_PROTOCOL; ··· 548 541 [IPSET_ATTR_BYTES] = { .type = NLA_U64 }, 549 542 [IPSET_ATTR_PACKETS] = { .type = NLA_U64 }, 550 543 [IPSET_ATTR_COMMENT] = { .type = NLA_NUL_STRING }, 544 + [IPSET_ATTR_SKBMARK] = { .type = NLA_U64 }, 545 + [IPSET_ATTR_SKBPRIO] = { .type = NLA_U32 }, 546 + [IPSET_ATTR_SKBQUEUE] = { .type = NLA_U16 }, 551 547 }, 552 548 .me = THIS_MODULE, 553 549 };
+13 -3
net/netfilter/ipset/ip_set_hash_net.c
··· 27 27 /* 2 nomatch flag support added */ 28 28 /* 3 Counters support added */ 29 29 /* 4 Comments support added */ 30 - #define IPSET_TYPE_REV_MAX 5 /* Forceadd support added */ 30 + /* 5 Forceadd support added */ 31 + #define IPSET_TYPE_REV_MAX 6 /* skbinfo mapping support added */ 31 32 32 33 MODULE_LICENSE("GPL"); 33 34 MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>"); ··· 151 150 !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || 152 151 !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS) || 153 152 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || 154 - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES))) 153 + !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || 154 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || 155 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || 156 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) 155 157 return -IPSET_ERR_PROTOCOL; 156 158 157 159 if (tb[IPSET_ATTR_LINENO]) ··· 322 318 !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || 323 319 !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS) || 324 320 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || 325 - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES))) 321 + !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || 322 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || 323 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || 324 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) 326 325 return -IPSET_ERR_PROTOCOL; 327 326 if (unlikely(tb[IPSET_ATTR_IP_TO])) 328 327 return -IPSET_ERR_HASH_RANGE_UNSUPPORTED; ··· 384 377 [IPSET_ATTR_BYTES] = { .type = NLA_U64 }, 385 378 [IPSET_ATTR_PACKETS] = { .type = NLA_U64 }, 386 379 [IPSET_ATTR_COMMENT] = { .type = NLA_NUL_STRING }, 380 + [IPSET_ATTR_SKBMARK] = { .type = NLA_U64 }, 381 + [IPSET_ATTR_SKBPRIO] = { .type = NLA_U32 }, 382 + [IPSET_ATTR_SKBQUEUE] = { .type = NLA_U16 }, 387 383 }, 388 384 .me = THIS_MODULE, 389 385 };
+13 -3
net/netfilter/ipset/ip_set_hash_netiface.c
··· 28 28 /* 2 /0 support added */ 29 29 /* 3 Counters support added */ 30 30 /* 4 Comments support added */ 31 - #define IPSET_TYPE_REV_MAX 5 /* Forceadd support added */ 31 + /* 5 Forceadd support added */ 32 + #define IPSET_TYPE_REV_MAX 6 /* skbinfo support added */ 32 33 33 34 MODULE_LICENSE("GPL"); 34 35 MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>"); ··· 282 281 !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || 283 282 !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS) || 284 283 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || 285 - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES))) 284 + !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || 285 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || 286 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || 287 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) 286 288 return -IPSET_ERR_PROTOCOL; 287 289 288 290 if (tb[IPSET_ATTR_LINENO]) ··· 518 514 !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || 519 515 !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS) || 520 516 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || 521 - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES))) 517 + !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || 518 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || 519 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || 520 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) 522 521 return -IPSET_ERR_PROTOCOL; 523 522 if (unlikely(tb[IPSET_ATTR_IP_TO])) 524 523 return -IPSET_ERR_HASH_RANGE_UNSUPPORTED; ··· 597 590 [IPSET_ATTR_BYTES] = { .type = NLA_U64 }, 598 591 [IPSET_ATTR_PACKETS] = { .type = NLA_U64 }, 599 592 [IPSET_ATTR_COMMENT] = { .type = NLA_NUL_STRING }, 593 + [IPSET_ATTR_SKBMARK] = { .type = NLA_U64 }, 594 + [IPSET_ATTR_SKBPRIO] = { .type = NLA_U32 }, 595 + [IPSET_ATTR_SKBQUEUE] = { .type = NLA_U16 }, 600 596 }, 601 597 .me = THIS_MODULE, 602 598 };
+13 -3
net/netfilter/ipset/ip_set_hash_netnet.c
··· 24 24 #include <linux/netfilter/ipset/ip_set_hash.h> 25 25 26 26 #define IPSET_TYPE_REV_MIN 0 27 - #define IPSET_TYPE_REV_MAX 1 /* Forceadd support added */ 27 + /* 1 Forceadd support added */ 28 + #define IPSET_TYPE_REV_MAX 2 /* skbinfo support added */ 28 29 29 30 MODULE_LICENSE("GPL"); 30 31 MODULE_AUTHOR("Oliver Smith <oliver@8.c.9.b.0.7.4.0.1.0.0.2.ip6.arpa>"); ··· 172 171 !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || 173 172 !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS) || 174 173 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || 175 - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES))) 174 + !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || 175 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || 176 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || 177 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) 176 178 return -IPSET_ERR_PROTOCOL; 177 179 178 180 if (tb[IPSET_ATTR_LINENO]) ··· 398 394 !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || 399 395 !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS) || 400 396 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || 401 - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES))) 397 + !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || 398 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || 399 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || 400 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) 402 401 return -IPSET_ERR_PROTOCOL; 403 402 if (unlikely(tb[IPSET_ATTR_IP_TO] || tb[IPSET_ATTR_IP2_TO])) 404 403 return -IPSET_ERR_HASH_RANGE_UNSUPPORTED; ··· 469 462 [IPSET_ATTR_BYTES] = { .type = NLA_U64 }, 470 463 [IPSET_ATTR_PACKETS] = { .type = NLA_U64 }, 471 464 [IPSET_ATTR_COMMENT] = { .type = NLA_NUL_STRING }, 465 + [IPSET_ATTR_SKBMARK] = { .type = NLA_U64 }, 466 + [IPSET_ATTR_SKBPRIO] = { .type = NLA_U32 }, 467 + [IPSET_ATTR_SKBQUEUE] = { .type = NLA_U16 }, 472 468 }, 473 469 .me = THIS_MODULE, 474 470 };
+13 -3
net/netfilter/ipset/ip_set_hash_netport.c
··· 29 29 /* 3 nomatch flag support added */ 30 30 /* 4 Counters support added */ 31 31 /* 5 Comments support added */ 32 - #define IPSET_TYPE_REV_MAX 6 /* Forceadd support added */ 32 + /* 6 Forceadd support added */ 33 + #define IPSET_TYPE_REV_MAX 7 /* skbinfo support added */ 33 34 34 35 MODULE_LICENSE("GPL"); 35 36 MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>"); ··· 173 172 !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || 174 173 !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS) || 175 174 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || 176 - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES))) 175 + !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || 176 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || 177 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || 178 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) 177 179 return -IPSET_ERR_PROTOCOL; 178 180 179 181 if (tb[IPSET_ATTR_LINENO]) ··· 393 389 !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || 394 390 !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS) || 395 391 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || 396 - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES))) 392 + !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || 393 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || 394 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || 395 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) 397 396 return -IPSET_ERR_PROTOCOL; 398 397 if (unlikely(tb[IPSET_ATTR_IP_TO])) 399 398 return -IPSET_ERR_HASH_RANGE_UNSUPPORTED; ··· 496 489 [IPSET_ATTR_BYTES] = { .type = NLA_U64 }, 497 490 [IPSET_ATTR_PACKETS] = { .type = NLA_U64 }, 498 491 [IPSET_ATTR_COMMENT] = { .type = NLA_NUL_STRING }, 492 + [IPSET_ATTR_SKBMARK] = { .type = NLA_U64 }, 493 + [IPSET_ATTR_SKBPRIO] = { .type = NLA_U32 }, 494 + [IPSET_ATTR_SKBQUEUE] = { .type = NLA_U16 }, 499 495 }, 500 496 .me = THIS_MODULE, 501 497 };
+13 -3
net/netfilter/ipset/ip_set_hash_netportnet.c
··· 26 26 27 27 #define IPSET_TYPE_REV_MIN 0 28 28 /* 0 Comments support added */ 29 - #define IPSET_TYPE_REV_MAX 1 /* Forceadd support added */ 29 + /* 1 Forceadd support added */ 30 + #define IPSET_TYPE_REV_MAX 2 /* skbinfo support added */ 30 31 31 32 MODULE_LICENSE("GPL"); 32 33 MODULE_AUTHOR("Oliver Smith <oliver@8.c.9.b.0.7.4.0.1.0.0.2.ip6.arpa>"); ··· 190 189 !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || 191 190 !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS) || 192 191 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || 193 - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES))) 192 + !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || 193 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || 194 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || 195 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) 194 196 return -IPSET_ERR_PROTOCOL; 195 197 196 198 if (tb[IPSET_ATTR_LINENO]) ··· 464 460 !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || 465 461 !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS) || 466 462 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || 467 - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES))) 463 + !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || 464 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || 465 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || 466 + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) 468 467 return -IPSET_ERR_PROTOCOL; 469 468 if (unlikely(tb[IPSET_ATTR_IP_TO] || tb[IPSET_ATTR_IP2_TO])) 470 469 return -IPSET_ERR_HASH_RANGE_UNSUPPORTED; ··· 576 569 [IPSET_ATTR_BYTES] = { .type = NLA_U64 }, 577 570 [IPSET_ATTR_PACKETS] = { .type = NLA_U64 }, 578 571 [IPSET_ATTR_COMMENT] = { .type = NLA_NUL_STRING }, 572 + [IPSET_ATTR_SKBMARK] = { .type = NLA_U64 }, 573 + [IPSET_ATTR_SKBPRIO] = { .type = NLA_U32 }, 574 + [IPSET_ATTR_SKBQUEUE] = { .type = NLA_U16 }, 579 575 }, 580 576 .me = THIS_MODULE, 581 577 };