netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] conntrack: made the protocol option value case insensitive
@ 2015-06-25 10:12 pfeiffer.szilard
  2015-06-26  7:19 ` Florian Westphal
  0 siblings, 1 reply; 4+ messages in thread
From: pfeiffer.szilard @ 2015-06-25 10:12 UTC (permalink / raw)
  To: netfilter-devel; +Cc: pfeiffer.szilard

From: Szilárd Pfeiffer <pfeiffer.szilard@balabit.hu>

Extensions register protocols by lowercase protocol name, but value of
proto command line option may be uppercase. Extension related options
cannot be used when protocol name comparision fails.

Signed-off-by: Szilárd Pfeiffer <pfeiffer.szilard@balabit.hu>
---
 src/conntrack.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/conntrack.c b/src/conntrack.c
index f7d37fb..b1a2589 100644
--- a/src/conntrack.c
+++ b/src/conntrack.c
@@ -555,6 +555,12 @@ static struct ctproto_handler *findproto(char *name, int *pnum)
 	/* using the protocol name for an unsupported protocol? */
 	if ((pent = getprotobyname(name))) {
 		*pnum = pent->p_proto;
+		list_for_each_entry(cur, &proto_list, head) {
+			if (cur->protonum == pent->p_proto) {
+				*pnum = cur->protonum;
+				return cur;
+			}
+		}
 		return &ct_proto_unknown;
 	}
 	/* using a protocol number? */
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-07-02 22:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-25 10:12 [PATCH] conntrack: made the protocol option value case insensitive pfeiffer.szilard
2015-06-26  7:19 ` Florian Westphal
2015-07-02 16:59   ` Pablo Neira Ayuso
2015-07-02 22:53   ` Szilárd Pfeiffer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).