[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
(usagi-users 04067) ping6: set scope for bind with link local address
- To: usagi-users@xxxxxxxxxxxxxx, YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@xxxxxxxxxxxxxx>
- Subject: (usagi-users 04067) ping6: set scope for bind with link local address
- From: Naohiro Ooiwa <nooiwa@xxxxxxxxxxxxxxxx>
- Date: Thu, 24 Jul 2008 17:52:53 +0900
- Reply-to: usagi-users@xxxxxxxxxxxxxxxxx
- User-agent: Thunderbird 2.0.0.14 (X11/20080501)
Hi all
I think I found a bug.
I specified interface and link-local address to -I option.
but command error.
The error message is following:
# ping6 -Ieth2 -Ife80::215:17ff:fe2e:cbe4 ff02::1
ping: bind icmp socket: Invalid argument
Attached patch fixes this problem.
Could you please check this patch?
--- iputils-s20071127/ping6.c.orig 2007-11-27 09:57:27.000000000 +0900
+++ iputils-s20071127/ping6.c 2008-07-18 16:14:15.000000000 +0900
@@ -423,6 +423,7 @@ int main(int argc, char *argv[])
ipi = (struct in6_pktinfo*)CMSG_DATA(cmsg);
memset(ipi, 0, sizeof(*ipi));
ipi->ipi6_ifindex = ifr.ifr_ifindex;
+ source.sin6_scope_id = ifr.ifr_ifindex;
}
if ((whereto.sin6_addr.s6_addr16[0]&htons(0xff00)) == htons (0xff00)) {
Regards,
Naohiro Ooiwa