# Accept Windows SMB broadcasts, so as to avoid spurious syslog entries from
# ZZZdenyandlog.def

if [ -n "$INTERNAL" -o -n "$EXTERNAL" ]; then
    for i in $INTERNAL $EXTERNAL; do
        ipnm_cache $i
        case $MASQMETHOD in
        ipfwadm)
	    if [ -n "$BCOFIF" ]; then
                $IPFWADM -I -a accept -W ${i%%:*} -S $IPOFIF/$NMOFIF -D $BCOFIF/32 137:139
	    fi
            ;;
        ipchains)
	    if [ -n "$BCOFIF" ]; then
                $IPCHAINS -A input -j ACCEPT -i ${i%%:*} -s $IPOFIF/$NMOFIF -d $BCOFIF/32 137:139 -p tcp
                $IPCHAINS -A input -j ACCEPT -i ${i%%:*} -s $IPOFIF/$NMOFIF -d $BCOFIF/32 137:139 -p udp
	    fi
            ;;
	netfilter)
	    if [ -n "$BCOFIF" ]; then
		$IPTABLES -A INPUT -j ACCEPT -i ${i%%:*} -s $IPOFIF/$NMOFIF -d $BCOFIF/32 -p tcp --dport 137:139
		$IPTABLES -A INPUT -j ACCEPT -i ${i%%:*} -s $IPOFIF/$NMOFIF -d $BCOFIF/32 -p udp --dport 137:139
	    fi
        esac
    done
fi