• R/O
  • HTTP
  • SSH
  • HTTPS

PeerCastIM: Commit


Commit MetaInfo

Revisãoc18dd4be3673d3d50ee020b45f28ff0f9625db49 (tree)
Hora2008-09-04 22:10:16
Autoreru <eru01@user...>
Commitereru

Mensagem de Log

Class D(Multicast)をリジェクト

Mudança Sumário

Diff

--- a/PeerCast.root/PeerCast/core/common/servent.cpp
+++ b/PeerCast.root/PeerCast/core/common/servent.cpp
@@ -3015,6 +3015,16 @@ int Servent::serverProc(ThreadInfo *thread)
30153015 if (servMgr->numActiveOnPort(sv->sock->host.port) < servMgr->maxServIn)
30163016 {
30173017 ClientSocket *cs = sv->sock->accept();
3018+
3019+ // 不正なソースアドレス(IPv4マルチキャスト)を除外
3020+ if (cs && (((cs->host.ip >> 24) & 0xF0) == 0xE0))
3021+ {
3022+ char ip[64];
3023+ cs->host.toStr(ip);
3024+ cs->close();
3025+ LOG_ERROR("reject incoming multicast address: %s", ip);
3026+ peercastApp->notifyMessage(ServMgr::NT_PEERCAST, "reject multicast address");
3027+ } else
30183028 if (cs)
30193029 {
30203030 LOG_DEBUG("accepted incoming");
--- a/PeerCast.root/PeerCast/core/common/version2.h
+++ b/PeerCast.root/PeerCast/core/common/version2.h
@@ -45,8 +45,8 @@ extern int version_ex; // PP
4545 //#define VERSION_EX 1
4646 static const char *PCP_CLIENT_VERSION_EX_PREFIX = "IM"; // 2bytes only
4747 static const int PCP_CLIENT_VERSION_EX_NUMBER = 28;
48-static const char *PCX_AGENTEX = "PeerCast/0.1218(IM0028)";
49-static const char *PCX_VERSTRING_EX = "v0.1218(IM0028)";
48+static const char *PCX_AGENTEX = "PeerCast/0.1218(IM0028-2)";
49+static const char *PCX_VERSTRING_EX = "v0.1218(IM0028-2)";
5050 #endif
5151
5252 // ------------------------------------------------
--- a/c:/Git/PeerCast.root/PeerCast/core/common/servent.cpp
+++ b/c:/Git/PeerCast.root/PeerCast/core/common/servent.cpp
@@ -3015,6 +3015,16 @@ int Servent::serverProc(ThreadInfo *thread)
30153015 if (servMgr->numActiveOnPort(sv->sock->host.port) < servMgr->maxServIn)
30163016 {
30173017 ClientSocket *cs = sv->sock->accept();
3018+
3019+ // 不正なソースアドレス(IPv4マルチキャスト)を除外
3020+ if (cs && (((cs->host.ip >> 24) & 0xF0) == 0xE0))
3021+ {
3022+ char ip[64];
3023+ cs->host.toStr(ip);
3024+ cs->close();
3025+ LOG_ERROR("reject incoming multicast address: %s", ip);
3026+ peercastApp->notifyMessage(ServMgr::NT_PEERCAST, "reject multicast address");
3027+ } else
30183028 if (cs)
30193029 {
30203030 LOG_DEBUG("accepted incoming");
--- a/c:/Git/PeerCast.root/PeerCast/core/common/version2.h
+++ b/c:/Git/PeerCast.root/PeerCast/core/common/version2.h
@@ -45,8 +45,8 @@ extern int version_ex; // PP
4545 //#define VERSION_EX 1
4646 static const char *PCP_CLIENT_VERSION_EX_PREFIX = "IM"; // 2bytes only
4747 static const int PCP_CLIENT_VERSION_EX_NUMBER = 28;
48-static const char *PCX_AGENTEX = "PeerCast/0.1218(IM0028)";
49-static const char *PCX_VERSTRING_EX = "v0.1218(IM0028)";
48+static const char *PCX_AGENTEX = "PeerCast/0.1218(IM0028-2)";
49+static const char *PCX_VERSTRING_EX = "v0.1218(IM0028-2)";
5050 #endif
5151
5252 // ------------------------------------------------
Show on old repository browser