netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: linux-2.4.21 and IPv6: problem solved
  2003-08-17 15:27 linux-2.4.21 and IPv6: problem solved w.szukalski
@ 2003-08-17 14:38 ` YOSHIFUJI Hideaki / 吉藤英明
  0 siblings, 0 replies; 2+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2003-08-17 14:38 UTC (permalink / raw)
  To: szukw000; +Cc: netdev

In article <20030817152725.A2212@keun> (at Sun, 17 Aug 2003 15:27:25 GMT), "w.szukalski" <szukw000@students.uni-mainz.de> says:

> First I regret: I did not mention the socket creation:
> 
> 	reader = socket(AF_INET6, SOCK_DGRAM, PF_UNSPEC);
> 	writer = socket(AF_INET6, SOCK_DGRAM, PF_UNSPEC);
                                              ~~~~~~~~~This is not good. use 0, or IPPROTO_UDP (for UDP).

--yoshfuji

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

* linux-2.4.21 and IPv6: problem solved
@ 2003-08-17 15:27 w.szukalski
  2003-08-17 14:38 ` YOSHIFUJI Hideaki / 吉藤英明
  0 siblings, 1 reply; 2+ messages in thread
From: w.szukalski @ 2003-08-17 15:27 UTC (permalink / raw)
  To: netdev

First I regret: I did not mention the socket creation:

	reader = socket(AF_INET6, SOCK_DGRAM, PF_UNSPEC);
	writer = socket(AF_INET6, SOCK_DGRAM, PF_UNSPEC);

In the meantime I inserted some 'printk(KERN_DEBUG "")' into the
kernel code.

Test program without connect():

linux/net/ipv6/af_inet6.c, inet6_bind():

        /* Binding to link-local address requires an interface */
        if (sk->bound_dev_if == 0) {
            release_sock(sk);
printk(KERN_DEBUG "%s:%d:link-local address without IF:EINVAL\n", 
__FILE__,__LINE__);
            return -EINVAL;
        }
After setting for 'ff02::1':
	read6.sin6_scope_id = 2;

the reader succeeded.

Test program with connect():

linux/net/ipv6/udp.c, udpv6_connect():
	
        /* Connect to link-local address requires an interface */
        if (sk->bound_dev_if == 0)
  {
printk(KERN_DEBUG "%s:%d:sk->bound_dev_if == 0:EINVAL\n", 
__FILE__,__LINE__);
            return -EINVAL;
  }

After setting for 'ff02::1':
	write6.sin6_scope_id = 2;

the writer succeeded.


winfried

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

end of thread, other threads:[~2003-08-17 15:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-17 15:27 linux-2.4.21 and IPv6: problem solved w.szukalski
2003-08-17 14:38 ` YOSHIFUJI Hideaki / 吉藤英明

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).