Skip to content

Commit

Permalink
Change monitor port to refer to remote port
Browse files Browse the repository at this point in the history
  • Loading branch information
ccanel committed May 7, 2024
1 parent 902e16e commit 777c50f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion ratemon/runtime/c/libratemon_interp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,8 @@ int accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen) {
RM_PRINTF("flow: %u:%u->%u:%u\n", flow.remote_addr, flow.remote_port,
flow.local_addr, flow.local_port);

if (flow.local_port != monitor_port) {
if (!(flow.remote_port >= monitor_port &&
flow.remote_port <= monitor_port + 1000)) {
RM_PRINTF("INFO: ignoring flow on port %u, not on monitor port %u\n",
flow.local_port, monitor_port);
return new_fd;
Expand Down
4 changes: 2 additions & 2 deletions ratemon/runtime/c/ratemon.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
// at most the oldest flow's epoch, even if other flows in the batch arrived
// more recently).
#define RM_NUM_TO_SCHEDULE_KEY "RM_NUM_TO_SCHEDULE"
// Environment variable that specifies the local port to manage using scheduled
// RWND tuning.
// Environment variable that specifies the start range of REMOTE ports to manage
// using scheduled RWND tuning.
#define RM_MONITOR_PORT "RM_MONITOR_PORT"

// Key for use in flow-based maps.
Expand Down

0 comments on commit 777c50f

Please sign in to comment.