All of lore.kernel.org
 help / color / mirror / Atom feed
* checking rule specifications in a match
@ 2006-06-19  9:08 Björn Lindström
  2006-06-20 13:23 ` Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: Björn Lindström @ 2006-06-19  9:08 UTC (permalink / raw)
  To: netfilter-devel

Hi.
I am writing an iptables match to match the IEC-60870-5-104 protocol.
I only want this match to be used on tcp packets and therefore I want 
iptables to reject rules if does not specify tcp as the protocol (-p 
tcp). I am currently doing this check in the checkentry function in the 
kernel module. This works but the error message only say "iptables: 
Unknown error 4294967295" if -p tcp is left out. Is it possible to do 
this check any other way to get a more comprehensible error message?
Thanks.
Björn Lindström

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: checking rule specifications in a match
  2006-06-19  9:08 checking rule specifications in a match Björn Lindström
@ 2006-06-20 13:23 ` Patrick McHardy
  0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2006-06-20 13:23 UTC (permalink / raw)
  To: Björn Lindström; +Cc: netfilter-devel

Björn Lindström wrote:
> Hi.
> I am writing an iptables match to match the IEC-60870-5-104 protocol.
> I only want this match to be used on tcp packets and therefore I want
> iptables to reject rules if does not specify tcp as the protocol (-p
> tcp). I am currently doing this check in the checkentry function in the
> kernel module. This works but the error message only say "iptables:
> Unknown error 4294967295" if -p tcp is left out. Is it possible to do
> this check any other way to get a more comprehensible error message?

This is probably because you're using a broken version of iptables
userspace. Current kernels allow you to enforce a specific protocol
by setting the .proto field in struct xt_match, which will also handle
inversion correctly and logs a message to the ringbuffer on error.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-06-20 13:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-19  9:08 checking rule specifications in a match Björn Lindström
2006-06-20 13:23 ` Patrick McHardy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.