summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-13 12:00:25 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-13 12:00:25 +0000
commit5b8339edf65091d3fab69cd902954a8da291b33f (patch)
treee7c39bc5e0eb3618fe0c8edf7546a81ede075f88
parente4917c6dcbb51c050ff2d5649dab3613e3b362ac (diff)
* ext/socket/ancdata.c (extract_ipv6_pktinfo): set sa_len for 4.4BSD.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--ext/socket/ancdata.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 85ee49027c..f8d2de674e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Fri Feb 13 20:59:48 2009 Tanaka Akira <akr@fsij.org>
+
+ * ext/socket/ancdata.c (extract_ipv6_pktinfo): set sa_len for 4.4BSD.
+
Fri Feb 13 15:34:18 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* iseq.c (simple_default_value): removed. default values of optional
diff --git a/ext/socket/ancdata.c b/ext/socket/ancdata.c
index b2c246260d..755fa38463 100644
--- a/ext/socket/ancdata.c
+++ b/ext/socket/ancdata.c
@@ -400,6 +400,7 @@ extract_ipv6_pktinfo(VALUE self, struct in6_pktinfo *pktinfo_ptr, struct sockadd
memcpy(pktinfo_ptr, RSTRING_PTR(data), sizeof(*pktinfo_ptr));
memset(sa_ptr, 0, sizeof(*sa_ptr));
+ SET_SA_LEN((struct sockaddr *)sa_ptr, sizeof(struct sockaddr_in6));
sa_ptr->sin6_family = AF_INET6;
memcpy(&sa_ptr->sin6_addr, &pktinfo_ptr->ipi6_addr, sizeof(sa_ptr->sin6_addr));
if (IN6_IS_ADDR_LINKLOCAL(&sa_ptr->sin6_addr))