Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
bwmtools
bwmtools
Commits
a4fccdf2
Commit
a4fccdf2
authored
Jul 10, 2005
by
Nigel Kukard
Browse files
* Removed ECN support, seems to of caused problems
* Cosmetic fixes in bwm_firewall
parent
584baa04
Changes
3
Hide whitespace changes
Inline
Side-by-side
bwm_firewall/bwm_firewall.c
View file @
a4fccdf2
...
...
@@ -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
);
}
...
...
bwmd/flow.c
View file @
a4fccdf2
...
...
@@ -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
;
}
...
...
bwmd/ipq.c
View file @
a4fccdf2
...
...
@@ -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
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment