Commit a4fccdf2 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

* Removed ECN support, seems to of caused problems

* Cosmetic fixes in bwm_firewall
parent 584baa04
......@@ -280,6 +280,8 @@ static int writeFirewall(GList *ruleList, char *filename, char load)
piptables_restore = popen("iptables-restore", "w");
if (!piptables_restore)
fprintf(stderr, "ERROR: Can not find iptables-restore in $PATH, skipping load\n");
printf("Loading firewall configuration directly into kernel...\n");
}
buffer = (char *) malloc0(BUFFER_SIZE);
......@@ -413,7 +415,7 @@ int main (int argc, char **argv)
// Write out firewall
if (fw)
{
printf("Writing IPTables configuration to \"%s\"...\n",outputFile);
printf("Processing firewall/shaping configuration...\n");
res = writeFirewall(fw,outputFile,loadFirewall);
}
......
......@@ -367,6 +367,7 @@ static unsigned int processPktQueue(struct runnerData_t *runnerData, struct pktQ
g_mutex_lock(runnerData->IPQLock);
// Check if our packet was changed
#if 0
if (packet->changed)
{
struct ip_packet_t *ip_packet = (struct ip_packet_t *) packet->payload->payload;
......@@ -375,12 +376,13 @@ static unsigned int processPktQueue(struct runnerData_t *runnerData, struct pktQ
status = ipq_set_verdict(runnerData->IPQHandle, PKT_ID(packet), NF_ACCEPT, ip_packet->tot_len, (unsigned char *) ip_packet);
}
else
#endif
status = ipq_set_verdict(runnerData->IPQHandle, PKT_ID(packet), NF_ACCEPT, 0, NULL);
g_mutex_unlock(runnerData->IPQLock);
if (status < 0)
{
logMessage(LOG_ERR, "Failed to ACCEPT packet\n");
logMessage(LOG_ERR, "Failed to ACCEPT packet: %s\n",ipq_errstr);
break;
}
......
......@@ -185,7 +185,8 @@ static int queuePacket(struct runnerData_t *runnerData, unsigned long int nfmark
prob = avgProb + curProb;
// Check if we should drop packet
drop = drand < prob;
#if 0
// If queue is 10% full, set CE bit if we ECN capable
if (!drop && (avgQueueSize / curQueueSize) > 0.10)
{
......@@ -201,6 +202,7 @@ static int queuePacket(struct runnerData_t *runnerData, unsigned long int nfmark
packet->changed = 1;
}
}
#endif
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment