Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F131586698
D9681.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
755 B
Referenced Files
None
Subscribers
None
D9681.id.diff
View Options
Index: head/contrib/blacklist/libexec/blacklistd-helper
===================================================================
--- head/contrib/blacklist/libexec/blacklistd-helper
+++ head/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
Fri, Oct 10, 12:39 PM (54 m, 22 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
23524704
Default Alt Text
D9681.id.diff (755 B)
Attached To
Mode
D9681: improve ipfw rule creation for blacklist-helper script
Attached
Detach File
Event Timeline
Log In to Comment