All of lore.kernel.org
 help / color / mirror / Atom feed
* libipt_multiport: getsockopt failed strangely: Invalid argument
@ 2006-11-27 18:54 Arnaud Fontaine
  0 siblings, 0 replies; 6+ messages in thread
From: Arnaud Fontaine @ 2006-11-27 18:54 UTC (permalink / raw)
  To: netfilter-devel

Hello,

When I try to use the '-m multiport' argument, I have the following
error message:

# /sbin/iptables -A INPUT -p tcp -m multiport --sports \
                 ssh,www,imap2,pop3,domain,https,smtp,auth -m state \
                  --state NEW,ESTABLISHED,RELATED -j ACCEPT
getsockopt failed strangely: Invalid argument

strace results:

munmap(0xf7fde000, 8192)                = 0
open("/lib/iptables/libipt_multiport.so", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\2\0\0\0\1\0\0\10"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=9208, ...}) = 0
mmap(NULL, 73704, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xf7dc0000
mprotect(0xf7dc2000, 65512, PROT_NONE)  = 0
mmap(0xf7dd0000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0xf7dd0000
close(3)                                = 0
socket(PF_INET, SOCK_RAW, IPPROTO_RAW)  = 3
getsockopt(3, SOL_IP, 0x42 /* IP_??? */, 0xff565346, 0xff565364) = -1 EINVAL (Invalid argument)
write(2, "getsockopt failed strangely: Inv"..., 46getsockopt failed strangely: Invalid argument) = 46                             

This error happens only with 2.6.17 and 2.6.18, using 2.6.15 it works
fine. I don't know at all how I could identify the problem. I'm using
Debian GNU/Linux with sparc64-smp Linux kernel and iptables 1.3.6. I
hope that i have sent this mail to the proper mailing list.

Regards,
Arnaud Fontaine

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

* libipt_multiport: getsockopt failed strangely: Invalid argument
@ 2006-12-01 12:00 Arnaud Fontaine
  2006-12-01 16:24 ` Patrick McHardy
  0 siblings, 1 reply; 6+ messages in thread
From: Arnaud Fontaine @ 2006-12-01 12:00 UTC (permalink / raw)
  To: netfilter-devel

Hello,

When I try to use the '-m multiport' argument, I have the following
error message:

# /sbin/iptables -A INPUT -p tcp -m multiport --sports \
                 ssh,www,imap2,pop3,domain,https,smtp,auth -m state \
                  --state NEW,ESTABLISHED,RELATED -j ACCEPT
getsockopt failed strangely: Invalid argument

strace results:

munmap(0xf7fde000, 8192)                = 0
open("/lib/iptables/libipt_multiport.so", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\2\0\0\0\1\0\0\10"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=9208, ...}) = 0
mmap(NULL, 73704, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xf7dc0000
mprotect(0xf7dc2000, 65512, PROT_NONE)  = 0
mmap(0xf7dd0000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0xf7dd0000
close(3)                                = 0
socket(PF_INET, SOCK_RAW, IPPROTO_RAW)  = 3
getsockopt(3, SOL_IP, 0x42 /* IP_??? */, 0xff565346, 0xff565364) = -1 EINVAL (Invalid argument)
write(2, "getsockopt failed strangely: Inv"..., 46getsockopt failed strangely: Invalid argument) = 46                             

This error happens only with 2.6.17 and 2.6.18, using 2.6.15 it works
fine. I don't know at all how I could identify the problem. I'm using
Debian GNU/Linux with sparc64-smp Linux kernel and iptables 1.3.6. I
hope that i have sent this mail to the proper mailing list.

Regards,
Arnaud Fontaine

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

* Re: libipt_multiport: getsockopt failed strangely: Invalid argument
  2006-12-01 12:00 libipt_multiport: getsockopt failed strangely: Invalid argument Arnaud Fontaine
@ 2006-12-01 16:24 ` Patrick McHardy
  2006-12-01 23:24   ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Patrick McHardy @ 2006-12-01 16:24 UTC (permalink / raw)
  To: Arnaud Fontaine; +Cc: netfilter-devel

Arnaud Fontaine wrote:
> Hello,
> 
> When I try to use the '-m multiport' argument, I have the following
> error message:
> 
> # /sbin/iptables -A INPUT -p tcp -m multiport --sports \
>                  ssh,www,imap2,pop3,domain,https,smtp,auth -m state \
>                   --state NEW,ESTABLISHED,RELATED -j ACCEPT
> getsockopt failed strangely: Invalid argument
> 
> strace results:
> 
> munmap(0xf7fde000, 8192)                = 0
> open("/lib/iptables/libipt_multiport.so", O_RDONLY) = 3
> read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\2\0\0\0\1\0\0\10"..., 512) = 512
> fstat64(3, {st_mode=S_IFREG|0644, st_size=9208, ...}) = 0
> mmap(NULL, 73704, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xf7dc0000
> mprotect(0xf7dc2000, 65512, PROT_NONE)  = 0
> mmap(0xf7dd0000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0xf7dd0000
> close(3)                                = 0
> socket(PF_INET, SOCK_RAW, IPPROTO_RAW)  = 3
> getsockopt(3, SOL_IP, 0x42 /* IP_??? */, 0xff565346, 0xff565364) = -1 EINVAL (Invalid argument)
> write(2, "getsockopt failed strangely: Inv"..., 46getsockopt failed strangely: Invalid argument) = 46                             
> 
> This error happens only with 2.6.17 and 2.6.18, using 2.6.15 it works
> fine. I don't know at all how I could identify the problem. I'm using
> Debian GNU/Linux with sparc64-smp Linux kernel and iptables 1.3.6. I
> hope that i have sent this mail to the proper mailing list.

I *think* this should be fixed in 2.6.19. The 32 bit compat code
didn't implement the SO_GET_REVISION_MATCH/TARGET options and
returned an error.

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

* Re: libipt_multiport: getsockopt failed strangely: Invalid argument
  2006-12-01 16:24 ` Patrick McHardy
@ 2006-12-01 23:24   ` David Miller
  2006-12-01 23:51     ` Patrick McHardy
  0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2006-12-01 23:24 UTC (permalink / raw)
  To: kaber; +Cc: arnaud, netfilter-devel

From: Patrick McHardy <kaber@trash.net>
Date: Fri, 01 Dec 2006 17:24:39 +0100

> I *think* this should be fixed in 2.6.19. The 32 bit compat code
> didn't implement the SO_GET_REVISION_MATCH/TARGET options and
> returned an error.

Agreed.

Once I have the fix I'll push it around to the -stable
branches for you Patrick.

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

* Re: libipt_multiport: getsockopt failed strangely: Invalid argument
  2006-12-01 23:24   ` David Miller
@ 2006-12-01 23:51     ` Patrick McHardy
  2006-12-02  4:15       ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Patrick McHardy @ 2006-12-01 23:51 UTC (permalink / raw)
  To: David Miller; +Cc: arnaud, netfilter-devel

[-- Attachment #1: Type: text/plain, Size: 539 bytes --]

David Miller wrote:
> From: Patrick McHardy <kaber@trash.net>
> Date: Fri, 01 Dec 2006 17:24:39 +0100
> 
> 
>>I *think* this should be fixed in 2.6.19. The 32 bit compat code
>>didn't implement the SO_GET_REVISION_MATCH/TARGET options and
>>returned an error.
> 
> 
> Agreed.
> 
> Once I have the fix I'll push it around to the -stable
> branches for you Patrick.
> 

Its already in 2.6.19, but I didn't expect it to really fix
something. I've attached it again, it applies all the way
back to 2.6.17 when the compat code was introduced.


[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1265 bytes --]

[NETFILTER]: ip_tables: revision support for compat code

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

---
commit 79030ed07de673e8451a03aecb9ada9f4d75d491
tree 4ba8bd843c8bc95db0ea6877880b73d06da620e5
parent bec71b162747708d4b45b0cd399b484f52f2901a
author Patrick McHardy <kaber@trash.net> Wed, 20 Sep 2006 12:05:08 -0700
committer David S. Miller <davem@sunset.davemloft.net> Fri, 22 Sep 2006 15:20:00 -0700

 net/ipv4/netfilter/ip_tables.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
index 3d5d4a4..673581d 100644
--- a/net/ipv4/netfilter/ip_tables.c
+++ b/net/ipv4/netfilter/ip_tables.c
@@ -1994,6 +1994,8 @@ compat_get_entries(struct compat_ipt_get
 	return ret;
 }
 
+static int do_ipt_get_ctl(struct sock *, int, void __user *, int *);
+
 static int
 compat_do_ipt_get_ctl(struct sock *sk, int cmd, void __user *user, int *len)
 {
@@ -2007,8 +2009,7 @@ compat_do_ipt_get_ctl(struct sock *sk, i
 		ret = compat_get_entries(user, len);
 		break;
 	default:
-		duprintf("compat_do_ipt_get_ctl: unknown request %i\n", cmd);
-		ret = -EINVAL;
+		ret = do_ipt_get_ctl(sk, cmd, user, len);
 	}
 	return ret;
 }

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

* Re: libipt_multiport: getsockopt failed strangely: Invalid argument
  2006-12-01 23:51     ` Patrick McHardy
@ 2006-12-02  4:15       ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2006-12-02  4:15 UTC (permalink / raw)
  To: kaber; +Cc: arnaud, netfilter-devel

From: Patrick McHardy <kaber@trash.net>
Date: Sat, 02 Dec 2006 00:51:20 +0100

> Its already in 2.6.19, but I didn't expect it to really fix
> something. I've attached it again, it applies all the way
> back to 2.6.17 when the compat code was introduced.

Pushed to -stable, thanks Patrick.

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

end of thread, other threads:[~2006-12-02  4:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-01 12:00 libipt_multiport: getsockopt failed strangely: Invalid argument Arnaud Fontaine
2006-12-01 16:24 ` Patrick McHardy
2006-12-01 23:24   ` David Miller
2006-12-01 23:51     ` Patrick McHardy
2006-12-02  4:15       ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2006-11-27 18:54 Arnaud Fontaine

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.