Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
c01b8c58
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
c01b8c58
编写于
7月 22, 2012
作者:
A
alanb
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6633549: (dc) Include-mode filtering of IPv6 sources does not block datagrams on Linux
Reviewed-by: chegar
上级
17f25997
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
19 addition
and
81 deletion
+19
-81
src/solaris/native/sun/nio/ch/DatagramDispatcher.c
src/solaris/native/sun/nio/ch/DatagramDispatcher.c
+1
-0
src/solaris/native/sun/nio/ch/Net.c
src/solaris/native/sun/nio/ch/Net.c
+8
-80
test/java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java
...o/channels/DatagramChannel/MulticastSendReceiveTests.java
+10
-1
未找到文件。
src/solaris/native/sun/nio/ch/DatagramDispatcher.c
浏览文件 @
c01b8c58
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
#include <sys/types.h>
#include <sys/types.h>
#include <sys/uio.h>
#include <sys/uio.h>
#include <sys/socket.h>
#include <sys/socket.h>
#include <string.h>
#include "nio_util.h"
#include "nio_util.h"
#include <limits.h>
#include <limits.h>
...
...
src/solaris/native/sun/nio/ch/Net.c
浏览文件 @
c01b8c58
...
@@ -39,83 +39,6 @@
...
@@ -39,83 +39,6 @@
#include "nio_util.h"
#include "nio_util.h"
#include "nio.h"
#include "nio.h"
/**
* Definitions for source-specific multicast to allow for building
* with older header files.
*/
#ifdef __solaris__
#ifndef IP_BLOCK_SOURCE
#define IP_BLOCK_SOURCE 0x15
#define IP_UNBLOCK_SOURCE 0x16
#define IP_ADD_SOURCE_MEMBERSHIP 0x17
#define IP_DROP_SOURCE_MEMBERSHIP 0x18
#define MCAST_BLOCK_SOURCE 0x2b
#define MCAST_UNBLOCK_SOURCE 0x2c
#define MCAST_JOIN_SOURCE_GROUP 0x2d
#define MCAST_LEAVE_SOURCE_GROUP 0x2e
#endif
/* IP_BLOCK_SOURCE */
struct
my_ip_mreq_source
{
struct
in_addr
imr_multiaddr
;
struct
in_addr
imr_sourceaddr
;
struct
in_addr
imr_interface
;
};
/*
* Use #pragma pack() construct to force 32-bit alignment on amd64.
*/
#if defined(amd64)
#pragma pack(4)
#endif
struct
my_group_source_req
{
uint32_t
gsr_interface
;
/* interface index */
struct
sockaddr_storage
gsr_group
;
/* group address */
struct
sockaddr_storage
gsr_source
;
/* source address */
};
#if defined(amd64)
#pragma pack()
#endif
#endif
/* __solaris__ */
#ifdef __linux__
#ifndef IP_BLOCK_SOURCE
#define IP_BLOCK_SOURCE 38
#define IP_UNBLOCK_SOURCE 37
#define IP_ADD_SOURCE_MEMBERSHIP 39
#define IP_DROP_SOURCE_MEMBERSHIP 40
#define MCAST_BLOCK_SOURCE 43
#define MCAST_UNBLOCK_SOURCE 44
#define MCAST_JOIN_SOURCE_GROUP 42
#define MCAST_LEAVE_SOURCE_GROUP 45
#endif
/* IP_BLOCK_SOURCE */
struct
my_ip_mreq_source
{
struct
in_addr
imr_multiaddr
;
struct
in_addr
imr_interface
;
struct
in_addr
imr_sourceaddr
;
};
struct
my_group_source_req
{
uint32_t
gsr_interface
;
/* interface index */
struct
sockaddr_storage
gsr_group
;
/* group address */
struct
sockaddr_storage
gsr_source
;
/* source address */
};
#endif
/* __linux__ */
#ifdef _ALLBSD_SOURCE
#ifdef _ALLBSD_SOURCE
#ifndef IP_BLOCK_SOURCE
#ifndef IP_BLOCK_SOURCE
...
@@ -155,7 +78,12 @@ struct my_group_source_req {
...
@@ -155,7 +78,12 @@ struct my_group_source_req {
struct
sockaddr_storage
gsr_source
;
/* source address */
struct
sockaddr_storage
gsr_source
;
/* source address */
};
};
#endif
/* _ALLBSD_SOURCE */
#else
/* _ALLBSD_SOURCE */
#define my_ip_mreq_source ip_mreq_source
#define my_group_source_req group_source_req
#endif
#define COPY_INET6_ADDRESS(env, source, target) \
#define COPY_INET6_ADDRESS(env, source, target) \
...
@@ -576,8 +504,8 @@ Java_sun_nio_ch_Net_joinOrDrop6(JNIEnv *env, jobject this, jboolean join, jobjec
...
@@ -576,8 +504,8 @@ Java_sun_nio_ch_Net_joinOrDrop6(JNIEnv *env, jobject this, jboolean join, jobjec
optval
=
(
void
*
)
&
mreq6
;
optval
=
(
void
*
)
&
mreq6
;
optlen
=
sizeof
(
mreq6
);
optlen
=
sizeof
(
mreq6
);
}
else
{
}
else
{
#if
defined (__linux__) || defined(MACOSX)
#if
def MACOSX
/*
Include-mode filtering broken on Mac OS & Linux at least to 2.6.24
*/
/*
no IPv6 include-mode filtering for now
*/
return
IOS_UNAVAILABLE
;
return
IOS_UNAVAILABLE
;
#else
#else
initGroupSourceReq
(
env
,
group
,
index
,
source
,
&
req
);
initGroupSourceReq
(
env
,
group
,
index
,
source
,
&
req
);
...
...
test/java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java
浏览文件 @
c01b8c58
...
@@ -22,10 +22,11 @@
...
@@ -22,10 +22,11 @@
*/
*/
/* @test
/* @test
* @bug 4527345 7026376
* @bug 4527345 7026376
6633549
* @summary Unit test for DatagramChannel's multicast support
* @summary Unit test for DatagramChannel's multicast support
* @build MulticastSendReceiveTests NetworkConfiguration
* @build MulticastSendReceiveTests NetworkConfiguration
* @run main MulticastSendReceiveTests
* @run main MulticastSendReceiveTests
* @run main/othervm -Djava.net.preferIPv4Stack=true MulticastSendReceiveTests
*/
*/
import
java.nio.ByteBuffer
;
import
java.nio.ByteBuffer
;
...
@@ -186,6 +187,10 @@ public class MulticastSendReceiveTests {
...
@@ -186,6 +187,10 @@ public class MulticastSendReceiveTests {
id
=
sendDatagram
(
source
,
nif
,
group
,
port
);
id
=
sendDatagram
(
source
,
nif
,
group
,
port
);
receiveDatagram
(
dc
,
source
,
id
);
receiveDatagram
(
dc
,
source
,
id
);
}
catch
(
UnsupportedOperationException
x
)
{
}
catch
(
UnsupportedOperationException
x
)
{
String
os
=
System
.
getProperty
(
"os.name"
);
// Exclude-mode filtering supported on these platforms so UOE should never be thrown
if
(
os
.
equals
(
"SunOS"
)
||
os
.
equals
(
"Linux"
))
throw
x
;
System
.
out
.
println
(
"Exclude-mode filtering not supported!"
);
System
.
out
.
println
(
"Exclude-mode filtering not supported!"
);
}
}
...
@@ -212,6 +217,10 @@ public class MulticastSendReceiveTests {
...
@@ -212,6 +217,10 @@ public class MulticastSendReceiveTests {
id
=
sendDatagram
(
source
,
nif
,
group
,
port
);
id
=
sendDatagram
(
source
,
nif
,
group
,
port
);
receiveDatagram
(
dc
,
source
,
id
);
receiveDatagram
(
dc
,
source
,
id
);
}
catch
(
UnsupportedOperationException
x
)
{
}
catch
(
UnsupportedOperationException
x
)
{
String
os
=
System
.
getProperty
(
"os.name"
);
// Include-mode filtering supported on these platforms so UOE should never be thrown
if
(
os
.
equals
(
"SunOS"
)
||
os
.
equals
(
"Linux"
))
throw
x
;
System
.
out
.
println
(
"Include-mode filtering not supported!"
);
System
.
out
.
println
(
"Include-mode filtering not supported!"
);
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录