mirror of
https://github.com/moparisthebest/sslh
synced 2024-11-28 12:02:22 -05:00
add longer check for xmpp preamble
original wasn't catching the preamble from Adium or Pidgin XMPP clients, because of a newline after the initial <xml> line. Grew the length of the check string so it'd see the word 'jabber' faster.
This commit is contained in:
parent
ce7c5b1ba2
commit
bdeccfd9ff
5
probe.c
5
probe.c
@ -169,7 +169,10 @@ static int is_tinc_protocol( const char *p, int len, struct proto *proto)
|
|||||||
* */
|
* */
|
||||||
static int is_xmpp_protocol( const char *p, int len, struct proto *proto)
|
static int is_xmpp_protocol( const char *p, int len, struct proto *proto)
|
||||||
{
|
{
|
||||||
if (len < 6)
|
/* sometimes the word 'jabber' shows up late in the initial string,
|
||||||
|
sometimes after a newline. this makes sure we snarf the entire preamble
|
||||||
|
and detect it. (fixed for adium/pidgin) */
|
||||||
|
if (len < 50)
|
||||||
return PROBE_AGAIN;
|
return PROBE_AGAIN;
|
||||||
|
|
||||||
return memmem(p, len, "jabber", 6) ? 1 : 0;
|
return memmem(p, len, "jabber", 6) ? 1 : 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user