diff options
author | John Denker <jsd@av8n.com> | 2012-07-29 15:45:38 -0700 |
---|---|---|
committer | John Denker <jsd@av8n.com> | 2012-07-29 15:45:38 -0700 |
commit | 0d2205555e68f414eec0afa8a6531626f77c4a57 (patch) | |
tree | f0e7d3e161f82180e834a6368d41b79272ab013a /ucspi-tcp-0.88/tcprules.c | |
parent | 0c7195dea3482bd4c9ac9fbff318c24c502574c6 (diff) | |
parent | 01ef1d365e5776b130e8b65772a80b6adcb0ed46 (diff) |
Merge branch 'master' of ephedra:usr/src/qmail into e_master
Diffstat (limited to 'ucspi-tcp-0.88/tcprules.c')
-rw-r--r-- | ucspi-tcp-0.88/tcprules.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/ucspi-tcp-0.88/tcprules.c b/ucspi-tcp-0.88/tcprules.c index a684ac5..83519c8 100644 --- a/ucspi-tcp-0.88/tcprules.c +++ b/ucspi-tcp-0.88/tcprules.c @@ -123,8 +123,15 @@ main(int argc,char **argv) } line.len = len; /* for die_bad() */ - colon = byte_chr(x,len,':'); - if (colon == len) continue; + colon = 0; + for (;;) { + int tmp; + tmp = byte_chr(x + colon,len - colon,':'); + colon += tmp; + if (colon == len) continue; + if (byte_equal(x+colon+1,4,"deny") || byte_equal(x+colon+1,5,"allow")) break; + ++colon; + } if (!stralloc_copyb(&address,x,colon)) nomem(); if (!stralloc_copys(&data,"")) nomem(); |