Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F141006054
D9681.id25401.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
740 B
Referenced Files
None
Subscribers
None
D9681.id25401.diff
View Options
Index: contrib/blacklist/libexec/blacklistd-helper
===================================================================
--- contrib/blacklist/libexec/blacklistd-helper
+++ contrib/blacklist/libexec/blacklistd-helper
@@ -63,8 +63,11 @@
tname="port$6"
/sbin/ipfw table $tname create type addr 2>/dev/null
/sbin/ipfw -q table $tname add "$addr/$mask"
- /sbin/ipfw -q add $rule drop $3 from "table("$tname")" to \
- any dst-port $6 && echo OK
+ # if rule number $rule does not already exist, create it
+ /sbin/ipfw show $rule >/dev/null 2>&1 || \
+ /sbin/ipfw add $rule drop $3 from \
+ table"("$tname")" to any dst-port $6 >/dev/null && \
+ echo OK
;;
npf)
/sbin/npfctl rule "$2" add block in final $proto from \
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 31, 4:19 PM (14 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27416180
Default Alt Text
D9681.id25401.diff (740 B)
Attached To
Mode
D9681: improve ipfw rule creation for blacklist-helper script
Attached
Detach File
Event Timeline
Log In to Comment