ip_fw_table.c (282155) | ip_fw_table.c (282286) |
---|---|
1/*- 2 * Copyright (c) 2004 Ruslan Ermilov and Vsevolod Lobko. 3 * Copyright (c) 2014 Yandex LLC 4 * Copyright (c) 2014 Alexander V. Chernikov 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2004 Ruslan Ermilov and Vsevolod Lobko. 3 * Copyright (c) 2014 Yandex LLC 4 * Copyright (c) 2014 Alexander V. Chernikov 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: head/sys/netpfil/ipfw/ip_fw_table.c 282155 2015-04-28 17:05:55Z melifaro $"); | 29__FBSDID("$FreeBSD: head/sys/netpfil/ipfw/ip_fw_table.c 282286 2015-04-30 21:51:12Z melifaro $"); |
30 31/* 32 * Lookup table support for ipfw. 33 * 34 * This file contains handlers for all generic tables' operations: 35 * add/del/flush entries, list/dump tables etc.. 36 * 37 * Table data modification is protected by both UH and runtime lock --- 3356 unchanged lines hidden (view full) --- 3394 /* Unref everything we have already done */ 3395 unref_oib_objects(ch, rule->cmd, oib, pidx); 3396 IPFW_UH_WUNLOCK(ch); 3397 return (error); 3398 } 3399 3400 IPFW_UH_WUNLOCK(ch); 3401 | 30 31/* 32 * Lookup table support for ipfw. 33 * 34 * This file contains handlers for all generic tables' operations: 35 * add/del/flush entries, list/dump tables etc.. 36 * 37 * Table data modification is protected by both UH and runtime lock --- 3356 unchanged lines hidden (view full) --- 3394 /* Unref everything we have already done */ 3395 unref_oib_objects(ch, rule->cmd, oib, pidx); 3396 IPFW_UH_WUNLOCK(ch); 3397 return (error); 3398 } 3399 3400 IPFW_UH_WUNLOCK(ch); 3401 |
3402 KASSERT(found + unresolved == ci->object_opcodes, 3403 ("refcount incosistency: found: %d unr: %d total: %d", 3404 found, unresolved, ci->object_opcodes)); | 3402 found = pidx - oib; 3403 KASSERT(found == ci->object_opcodes, 3404 ("refcount inconsistency: found: %d total: %d", 3405 found, ci->object_opcodes)); |
3405 3406 /* Perform auto-creation for non-existing objects */ 3407 if (numnew != 0) 3408 error = create_objects_compat(ch, rule->cmd, oib, pidx, ti); 3409 3410 return (error); 3411} 3412 --- 146 unchanged lines hidden --- | 3406 3407 /* Perform auto-creation for non-existing objects */ 3408 if (numnew != 0) 3409 error = create_objects_compat(ch, rule->cmd, oib, pidx, ti); 3410 3411 return (error); 3412} 3413 --- 146 unchanged lines hidden --- |