- in_addr_t ip = inet_addr(data->argv[2]);
- uint16_t port = atoi(data->argv[3]);
-
- if (!ip || ip == INADDR_NONE)
- {
- data->response = NSCTL_RES_ERR;
- data->additional = "invalid ip address";
- return PLUGIN_RET_STOP;
- }
-
- if (!port)
- {
- data->response = NSCTL_RES_ERR;
- data->additional = "invalid port";
- return PLUGIN_RET_STOP;
- }
-
- if (ip == s->snoop_ip && port == s->snoop_port)
- {
- data->response = NSCTL_RES_ERR;
- data->additional = "already intercepted";
- return PLUGIN_RET_STOP;
- }
-
- s->snoop_ip = ip;
- s->snoop_port = port;
+ data->response = NSCTL_RES_ERR;
+ data->additional = "invalid port";
+ return PLUGIN_RET_STOP;