Page MenuHomeFreeBSD

D9681.id25401.diff
No OneTemporary

D9681.id25401.diff

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

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)

Event Timeline