lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <e33b34250812191918t5d139c32qe0f1f6e56a887ceb@mail.gmail.com>
Date:	Sat, 20 Dec 2008 11:18:36 +0800
From:	"Kenneth Zhu" <ipiv.ipvi@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: [IPv6] kernel_sendmsg returned -101 to kernel module for some multicast destination

Hello,

I've been trying to send all sorts of IPv6 packets in my kernel
module and most of them succeeded, while when I want to
send to some special address -- ff02::d in my case --
kernel_sendmsg returned me a -101 error code which means
"Network Unreachable". Compared to similar application layer
implementation like ping6, I find it also reports an error when
the outbound interface is not specified.

This is part of my source code regarding this error, while I think
I have specified the outbound interface (mcast_oif). Is anybody
knows where the problem is?

       sock->sk->sk_allocation = GFP_NOIO;

       inet = inet_sk(sock->sk);
       inet->num = ip6h->nexthdr;
       inet->hdrincl = 1;

       np = inet6_sk(sock->sk);
       np->sndflow = 0;
       np->daddr = ip6h->daddr;
       np->saddr = ip6h->saddr;
       np->hop_limit = ip6h->hop_limit;
       np->mcast_oif = v6index;

       sin.sin6_family = PF_INET6;
       sin.sin6_addr = ip6h->daddr;
       sin.sin6_port = htons(ip6h->nexthdr);

       iov.iov_base = data;
       iov.iov_len = pktlen;
       msg.msg_name = &sin;
       msg.msg_namelen = sizeof(sin);
       msg.msg_control = NULL;
       msg.msg_controllen = 0;
       msg.msg_flags = MSG_NOSIGNAL;

       kernel_sendmsg(sock, &msg, &iov, 1, pktlen);

Thank you very much!

Best regards,

Kenneth. Z
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ