mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-25 11:15:34 +00:00
Allocate memory as M_IPFW,now we can watch firewall memory usage
in vmstat..
This commit is contained in:
parent
1079e644a8
commit
9870b4d2de
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=7035
|
@ -523,7 +523,7 @@ int s=splnet();
|
|||
struct ip_fw *ftmp;
|
||||
ftmp = *chainptr;
|
||||
*chainptr = ftmp->fw_next;
|
||||
free(ftmp,M_SOOPTS);
|
||||
free(ftmp,M_IPFW);
|
||||
}
|
||||
splx(s);
|
||||
}
|
||||
|
@ -545,7 +545,7 @@ struct ip_fw *frwl;
|
|||
int addb4=0;
|
||||
int n_o,n_n;
|
||||
|
||||
ftmp = malloc(sizeof(struct ip_fw),M_SOOPTS,M_DONTWAIT);
|
||||
ftmp = malloc(sizeof(struct ip_fw),M_IPFW,M_DONTWAIT);
|
||||
if ( ftmp == NULL ) {
|
||||
dprintf1("ip_fw_ctl: malloc said no\n");
|
||||
splx(s);
|
||||
|
@ -751,13 +751,13 @@ struct ip_fw *frwl;
|
|||
if (ltmp)
|
||||
{
|
||||
ltmp->fw_next=ftmp->fw_next;
|
||||
free(ftmp,M_SOOPTS);
|
||||
free(ftmp,M_IPFW);
|
||||
ftmp=ltmp->fw_next;
|
||||
}
|
||||
else
|
||||
{
|
||||
*chainptr=ftmp->fw_next;
|
||||
free(ftmp,M_SOOPTS);
|
||||
free(ftmp,M_IPFW);
|
||||
ftmp=*chainptr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue