Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
589fccae
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看板
提交
589fccae
编写于
7月 12, 2010
作者:
C
chegar
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6967937: Scope id no longer being set after 6931566
Reviewed-by: alanb, dsamersoff
上级
8063d839
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
14 addition
and
6 deletion
+14
-6
src/solaris/native/java/net/NetworkInterface.c
src/solaris/native/java/net/NetworkInterface.c
+12
-5
test/java/net/Inet6Address/B6214234.java
test/java/net/Inet6Address/B6214234.java
+2
-1
未找到文件。
src/solaris/native/java/net/NetworkInterface.c
浏览文件 @
589fccae
...
@@ -129,7 +129,7 @@ static int openSocketWithFallback(JNIEnv *env, const char *ifname);
...
@@ -129,7 +129,7 @@ static int openSocketWithFallback(JNIEnv *env, const char *ifname);
static
struct
sockaddr
*
getBroadcast
(
JNIEnv
*
env
,
int
sock
,
const
char
*
name
,
struct
sockaddr
*
brdcast_store
);
static
struct
sockaddr
*
getBroadcast
(
JNIEnv
*
env
,
int
sock
,
const
char
*
name
,
struct
sockaddr
*
brdcast_store
);
static
short
getSubnet
(
JNIEnv
*
env
,
int
sock
,
const
char
*
ifname
);
static
short
getSubnet
(
JNIEnv
*
env
,
int
sock
,
const
char
*
ifname
);
static
int
getIndex
(
JNIEnv
*
env
,
int
sock
,
const
char
*
ifname
);
static
int
getIndex
(
int
sock
,
const
char
*
ifname
);
static
int
getFlags
(
JNIEnv
*
env
,
int
sock
,
const
char
*
ifname
);
static
int
getFlags
(
JNIEnv
*
env
,
int
sock
,
const
char
*
ifname
);
static
int
getMacAddress
(
JNIEnv
*
env
,
int
sock
,
const
char
*
ifname
,
const
struct
in_addr
*
addr
,
unsigned
char
*
buf
);
static
int
getMacAddress
(
JNIEnv
*
env
,
int
sock
,
const
char
*
ifname
,
const
struct
in_addr
*
addr
,
unsigned
char
*
buf
);
...
@@ -911,7 +911,7 @@ netif *addif(JNIEnv *env, int sock, const char * if_name, netif *ifs, struct soc
...
@@ -911,7 +911,7 @@ netif *addif(JNIEnv *env, int sock, const char * if_name, netif *ifs, struct soc
CHECKED_MALLOC3
(
currif
,
netif
*
,
sizeof
(
netif
)
+
IFNAMSIZ
);
CHECKED_MALLOC3
(
currif
,
netif
*
,
sizeof
(
netif
)
+
IFNAMSIZ
);
currif
->
name
=
(
char
*
)
currif
+
sizeof
(
netif
);
currif
->
name
=
(
char
*
)
currif
+
sizeof
(
netif
);
strcpy
(
currif
->
name
,
name
);
strcpy
(
currif
->
name
,
name
);
currif
->
index
=
getIndex
(
env
,
sock
,
name
);
currif
->
index
=
getIndex
(
sock
,
name
);
currif
->
addr
=
NULL
;
currif
->
addr
=
NULL
;
currif
->
childs
=
NULL
;
currif
->
childs
=
NULL
;
currif
->
virtual
=
isVirtual
;
currif
->
virtual
=
isVirtual
;
...
@@ -946,7 +946,7 @@ netif *addif(JNIEnv *env, int sock, const char * if_name, netif *ifs, struct soc
...
@@ -946,7 +946,7 @@ netif *addif(JNIEnv *env, int sock, const char * if_name, netif *ifs, struct soc
CHECKED_MALLOC3
(
currif
,
netif
*
,
sizeof
(
netif
)
+
IFNAMSIZ
);
CHECKED_MALLOC3
(
currif
,
netif
*
,
sizeof
(
netif
)
+
IFNAMSIZ
);
currif
->
name
=
(
char
*
)
currif
+
sizeof
(
netif
);
currif
->
name
=
(
char
*
)
currif
+
sizeof
(
netif
);
strcpy
(
currif
->
name
,
vname
);
strcpy
(
currif
->
name
,
vname
);
currif
->
index
=
getIndex
(
env
,
sock
,
vname
);
currif
->
index
=
getIndex
(
sock
,
vname
);
currif
->
addr
=
NULL
;
currif
->
addr
=
NULL
;
/* Need to duplicate the addr entry? */
/* Need to duplicate the addr entry? */
currif
->
virtual
=
1
;
currif
->
virtual
=
1
;
...
@@ -1133,7 +1133,7 @@ static netif *enumIPv6Interfaces(JNIEnv *env, int sock, netif *ifs) {
...
@@ -1133,7 +1133,7 @@ static netif *enumIPv6Interfaces(JNIEnv *env, int sock, netif *ifs) {
#endif
#endif
static
int
getIndex
(
JNIEnv
*
env
,
int
sock
,
const
char
*
name
){
static
int
getIndex
(
int
sock
,
const
char
*
name
){
/*
/*
* Try to get the interface index
* Try to get the interface index
* (Not supported on Solaris 2.6 or 7)
* (Not supported on Solaris 2.6 or 7)
...
@@ -1390,6 +1390,13 @@ static netif *enumIPvXInterfaces(JNIEnv *env, int sock, netif *ifs, int family)
...
@@ -1390,6 +1390,13 @@ static netif *enumIPvXInterfaces(JNIEnv *env, int sock, netif *ifs, int family)
continue
;
continue
;
}
}
#ifdef AF_INET6
if
(
ifr
->
lifr_addr
.
ss_family
==
AF_INET6
)
{
struct
sockaddr_in6
*
s6
=
(
struct
sockaddr_in6
*
)
&
(
ifr
->
lifr_addr
);
s6
->
sin6_scope_id
=
getIndex
(
sock
,
ifr
->
lifr_name
);
}
#endif
/* add to the list */
/* add to the list */
ifs
=
addif
(
env
,
sock
,
ifr
->
lifr_name
,
ifs
,
(
struct
sockaddr
*
)
&
(
ifr
->
lifr_addr
),
family
,
(
short
)
ifr
->
lifr_addrlen
);
ifs
=
addif
(
env
,
sock
,
ifr
->
lifr_name
,
ifs
,
(
struct
sockaddr
*
)
&
(
ifr
->
lifr_addr
),
family
,
(
short
)
ifr
->
lifr_addrlen
);
...
@@ -1407,7 +1414,7 @@ static netif *enumIPvXInterfaces(JNIEnv *env, int sock, netif *ifs, int family)
...
@@ -1407,7 +1414,7 @@ static netif *enumIPvXInterfaces(JNIEnv *env, int sock, netif *ifs, int family)
return
ifs
;
return
ifs
;
}
}
static
int
getIndex
(
JNIEnv
*
env
,
int
sock
,
const
char
*
name
){
static
int
getIndex
(
int
sock
,
const
char
*
name
){
/*
/*
* Try to get the interface index
* Try to get the interface index
* (Not supported on Solaris 2.6 or 7)
* (Not supported on Solaris 2.6 or 7)
...
...
test/java/net/Inet6Address/B6214234.java
浏览文件 @
589fccae
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
/**
/**
* @test
* @test
* @bug 6214234
* @bug 6214234
6967937
* @summary IPv6 scope_id for local addresses not set in Solaris 10
* @summary IPv6 scope_id for local addresses not set in Solaris 10
*/
*/
...
@@ -51,6 +51,7 @@ public class B6214234 {
...
@@ -51,6 +51,7 @@ public class B6214234 {
return
;
return
;
}
}
if
(
addr
.
getScopeId
()
==
0
)
{
if
(
addr
.
getScopeId
()
==
0
)
{
System
.
out
.
println
(
"addr: "
+
addr
);
throw
new
RuntimeException
(
"Non zero scope_id expected"
);
throw
new
RuntimeException
(
"Non zero scope_id expected"
);
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录