Allocate memory as M_IPFW,now we can watch firewall memory usage

in vmstat..
This commit is contained in:
Ugen J.S. Antsilevich 1995-03-12 13:28:13 +00:00
parent 1079e644a8
commit 9870b4d2de
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=7035

View file

@ -523,7 +523,7 @@ int s=splnet();
struct ip_fw *ftmp; struct ip_fw *ftmp;
ftmp = *chainptr; ftmp = *chainptr;
*chainptr = ftmp->fw_next; *chainptr = ftmp->fw_next;
free(ftmp,M_SOOPTS); free(ftmp,M_IPFW);
} }
splx(s); splx(s);
} }
@ -545,7 +545,7 @@ struct ip_fw *frwl;
int addb4=0; int addb4=0;
int n_o,n_n; 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 ) { if ( ftmp == NULL ) {
dprintf1("ip_fw_ctl: malloc said no\n"); dprintf1("ip_fw_ctl: malloc said no\n");
splx(s); splx(s);
@ -751,13 +751,13 @@ struct ip_fw *frwl;
if (ltmp) if (ltmp)
{ {
ltmp->fw_next=ftmp->fw_next; ltmp->fw_next=ftmp->fw_next;
free(ftmp,M_SOOPTS); free(ftmp,M_IPFW);
ftmp=ltmp->fw_next; ftmp=ltmp->fw_next;
} }
else else
{ {
*chainptr=ftmp->fw_next; *chainptr=ftmp->fw_next;
free(ftmp,M_SOOPTS); free(ftmp,M_IPFW);
ftmp=*chainptr; ftmp=*chainptr;
} }