[bwm-tools-devel] COMMIT - r78 - in trunk: bwm_firewall bwmd
Brought to you by:
nkukard
From: <sv...@li...> - 2005-07-10 13:01:05
|
Author: nkukard Date: 2005-07-10 11:05:54 +0000 (Sun, 10 Jul 2005) New Revision: 78 Modified: trunk/bwm_firewall/bwm_firewall.c trunk/bwmd/flow.c trunk/bwmd/ipq.c Log: * Removed ECN support, seems to of caused problems * Cosmetic fixes in bwm_firewall Modified: trunk/bwm_firewall/bwm_firewall.c =================================================================== --- trunk/bwm_firewall/bwm_firewall.c 2005-06-20 08:18:02 UTC (rev 77) +++ trunk/bwm_firewall/bwm_firewall.c 2005-07-10 11:05:54 UTC (rev 78) @@ -280,6 +280,8 @@ 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 @@ // Write out firewall if (fw) { - printf("Writing IPTables configuration to \"%s\"...\n",outputFile); + printf("Processing firewall/shaping configuration...\n"); res = writeFirewall(fw,outputFile,loadFirewall); } Modified: trunk/bwmd/flow.c =================================================================== --- trunk/bwmd/flow.c 2005-06-20 08:18:02 UTC (rev 77) +++ trunk/bwmd/flow.c 2005-07-10 11:05:54 UTC (rev 78) @@ -367,6 +367,7 @@ 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 @@ 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; } Modified: trunk/bwmd/ipq.c =================================================================== --- trunk/bwmd/ipq.c 2005-06-20 08:18:02 UTC (rev 77) +++ trunk/bwmd/ipq.c 2005-07-10 11:05:54 UTC (rev 78) @@ -185,7 +185,8 @@ 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 @@ packet->changed = 1; } } +#endif } } |