My Custom PacketFilter is letting pass packets?

Hello,

I created a packetFilter, so i could extend sparkweb/openfire functionality.

Sparkweb issues special iq messages, this messages are intercepted by the filter and some action is performed on the server.

I was expecting the filter to use the packets, and not letting them pass to the server.

(i analyzed a Drop class for a rule of a PacketFilterPlugin)

what i am seing is that the server receives the packet and returns a error…

the viltfilter@vilt-lt2 jid is nonexistent and only a way to distinguish my special packets (prefer this to qname’s)

18:14:54.750 [INFO] OUTGOING: request
warning: unable to bind to property ‘room’ on class ‘com.jivesoftware.spark.chats::SparkChat’

18:14:55.390 [INFO] INCOMING: request

18:14:55.406 [ERROR] Error: service-unavailable - service-unavailable

the packet shoul be dropped before any receiver checking, or not?

how to avoid the packet to reach the server?

Tx!

joao

the packet shoul be dropped before any receiver checking, or not?

how to avoid the packet to reach the server?

IQ packets must not be dropped. XMPP does only allow to cancel them. The server needs to return either an result or error.

Maybe you should create a component and send your packets to that JID.

Tx! I will try that solution instead.

I have the same problem.

What if I have a Message instead of IQ?

I am receiving it correctly with my MessageFilter, and I would like to drop it. The main problem of further (or previous?) processing is that it appears a chat window (it is a heading packet but i guess it would happen also with normal) and I don’t want that.

I thought I could add a listener, then add a CustomizedFilter (not a simple MessageFilter), do whatever i want inside there and return accept->false if it matched my packets or accept->true so it can be processed by others. Does it make sense? And is there a way that my listener is the first (otherwise the windows appear before it’s dropped)?

@evil:

I don’t understand what you mean with “CustomizedFilter” and “MessageFilter”. You are talking about rules in the PacketFilter plugin, right? All packets that are not of type IQ can be droped. Just choose “Drop” as action.

If you are talking about implementing your own PacketInterceptor, you maybe want to take a look on the Raptor plugin, which has much more features than PacketFilter. (however, its also much more complicated to use… )

Message was edited by: Coolcat

Mh no, I was just searching for some problem similar to mine (I am developing a plugin for Spark, and custom headline Messages are sent by Openfire) and I found this thread.

Since the section is: Ignite Realtime > Plugins and Libraries > Packet Filter > Discussions

I thought I could find the best suggestion here for a library (being a Smack, Spark, or PluginFilter function I don’t care, even though I would prefer to avoid the plugin).

So, what I meant was:

I developed a Spark plugin which creates a MessageFilter (from Spark functions) and processes it.

The problem it that it is a headline Message, thus Spark listener open a window for it.

I would like to avoid that window.

I’m not developing for Spark, I’m not even using it. Can’t help you with that.

This forum is for users of the Openfire plugin PacketFilter. You should ask in “Spark Dev” or “Community Plugins”.

Thank you, I tried, but I doubt I will receive any answer, it appears pretty much dead there