From: <li...@pr...> - 2004-01-31 04:31:36
|
Update of /cvsroot/iptables-p2p/iptables-p2p/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31325 Modified Files: match_http.c Log Message: shareaza/gnutella2 support Index: match_http.c =================================================================== RCS file: /cvsroot/iptables-p2p/iptables-p2p/kernel/match_http.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- match_http.c 1 Jan 2004 20:03:31 -0000 1.7 +++ match_http.c 29 Jan 2004 17:40:29 -0000 1.8 @@ -163,19 +163,33 @@ headers_matched[header] = 1; } - /* Kazaa */ + +/* + * Kazaa + */ + /* Kazaa < 2.6 */ if ((MM(NM_GET_HASH) || MM(MM_HTTP11)) && HM(HM_X_KAZAA)) return IPT_P2P_PROTO_KAZAA; - /* Kazaa 2.6 (TODO: needs testing) */ + /* Kazaa >= 2.6 (TODO: needs testing) */ if ((MM(NM_GET_FILE) || MM(MM_HTTP11)) && HM(HM_X_P2P_MESSAGE)) return IPT_P2P_PROTO_KAZAA; - /* Gnutella */ +/* + * Gnutella + */ + /* Gnutella 1 */ if ((MM(MM_GET_GET) || MM(MM_GET_URIRES) || MM(MM_HTTP11)) && (HM(HM_X_GNUTELLA))) return IPT_P2P_PROTO_GNUTELLA; + /* Shareazza/Gnutella 2 */ + if ((MM(MM_GET_URIRES) && (HM(HM_CONTENT_URN) || HM(HM_X_QUEUE)))) + return IPT_P2P_PROTO_GNUTELLA; + + if (MM(MM_HTTP11) && HM(HM_X_TIGER_THREE)) + return IPT_P2P_PROTO_GNUTELLA; + /* * These are not supported or undrestood by the common ipt_p2p.h, and * so not used yet. @@ -187,13 +201,6 @@ if (MM(MM_GET_POISONED)) return 1; - - /* Shareazza */ - if ((MM(MM_GET_URIRES) && (HM(HM_CONTENT_URN) || HM(HM_X_QUEUE)))) - return 1; - - if (MM(MM_HTTP11) && HM(HM_X_TIGER_THREE)) - return 1; #endif return 0; |