1/*- 2 * Copyright (c) 2001 Daniel Hartmeier 3 * Copyright (c) 2002,2003 Henning Brauer 4 * Copyright (c) 2012 Gleb Smirnoff <glebius@FreeBSD.org> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 22 unchanged lines hidden (view full) --- 31 * Effort sponsored in part by the Defense Advanced Research Projects 32 * Agency (DARPA) and Air Force Research Laboratory, Air Force 33 * Materiel Command, USAF, under agreement number F30602-01-2-0537. 34 * 35 * $OpenBSD: pf_ioctl.c,v 1.213 2009/02/15 21:46:12 mbalmer Exp $ 36 */ 37 38#include <sys/cdefs.h> |
39__FBSDID("$FreeBSD: stable/10/sys/netpfil/pf/pf_ioctl.c 285940 2015-07-28 09:13:55Z glebius $"); |
40 41#include "opt_inet.h" 42#include "opt_inet6.h" 43#include "opt_bpf.h" 44#include "opt_pf.h" 45 46#include <sys/param.h> 47#include <sys/bus.h> --- 3377 unchanged lines hidden (view full) --- 3425 if (PF_MATCHA(psnk->psnk_src.neg, 3426 &psnk->psnk_src.addr.v.a.addr, 3427 &psnk->psnk_src.addr.v.a.mask, 3428 &sn->addr, sn->af) && 3429 PF_MATCHA(psnk->psnk_dst.neg, 3430 &psnk->psnk_dst.addr.v.a.addr, 3431 &psnk->psnk_dst.addr.v.a.mask, 3432 &sn->raddr, sn->af)) { |
3433 pf_unlink_src_node(sn); |
3434 LIST_INSERT_HEAD(&kill, sn, entry); 3435 sn->expire = 1; 3436 } 3437 PF_HASHROW_UNLOCK(sh); 3438 } 3439 3440 for (int i = 0; i <= pf_hashmask; i++) { 3441 struct pf_idhash *ih = &V_pf_idhash[i]; 3442 struct pf_state *s; 3443 3444 PF_HASHROW_LOCK(ih); 3445 LIST_FOREACH(s, &ih->states, entry) { |
3446 if (s->src_node && s->src_node->expire == 1) |
3447 s->src_node = NULL; |
3448 if (s->nat_src_node && s->nat_src_node->expire == 1) |
3449 s->nat_src_node = NULL; |
3450 } 3451 PF_HASHROW_UNLOCK(ih); 3452 } 3453 3454 psnk->psnk_killed = pf_free_src_nodes(&kill); 3455} 3456 3457/* --- 344 unchanged lines hidden --- |