diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-02-21 15:59:00 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-02-21 16:00:50 +0100 |
commit | 2a022fb7174939a80d51936325f6af562ad5a85f (patch) | |
tree | 5d3185e6a07334b2a6f5eda0635321f44deff919 /src | |
parent | aa925010951e79a860d0c1e4365f72d68eedf02d (diff) | |
download | conntrack-tools-2a022fb7174939a80d51936325f6af562ad5a85f.tar.gz conntrack-tools-2a022fb7174939a80d51936325f6af562ad5a85f.zip |
conntrackd: allow using lower/upper case in ExpectationSync
You can use:
ExpectationSync {
ftp
ras
q.931
sip
}
or:
ExpectationSync {
FTP
RAS
Q.931
SIP
}
no matter lower/upper case.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/filter.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/filter.c b/src/filter.c index afefbfa..39dd4ca 100644 --- a/src/filter.c +++ b/src/filter.c @@ -1,6 +1,7 @@ /* - * (C) 2006-2008 by Pablo Neira Ayuso <pablo@netfilter.org> - * + * (C) 2006-2012 by Pablo Neira Ayuso <pablo@netfilter.org> + * (C) 2011-2012 by Vyatta Inc <http://www.vyatta.com> + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -449,7 +450,7 @@ int exp_filter_add(struct exp_filter *f, const char *helper_name) return -1; list_for_each_entry(item, &f->list, head) { - if (strncmp(item->helper_name, helper_name, + if (strncasecmp(item->helper_name, helper_name, NFCT_HELPER_NAME_MAX) == 0) { return -1; } @@ -475,7 +476,7 @@ int exp_filter_find(struct exp_filter *f, const struct nf_expect *exp) const char *name = nfexp_get_attr(exp, ATTR_EXP_HELPER_NAME); /* we allow partial matching to support things like sip-PORT. */ - if (strncmp(item->helper_name, name, + if (strncasecmp(item->helper_name, name, strlen(item->helper_name)) == 0) { return 1; } |