Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
9092b208
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
9092b208
编写于
10月 23, 2005
作者:
L
Linus Torvalds
浏览文件
操作
浏览文件
下载
差异文件
Merge master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6
上级
e80eda94
49636bb1
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
16 addition
and
32 deletion
+16
-32
net/core/neighbour.c
net/core/neighbour.c
+16
-32
未找到文件。
net/core/neighbour.c
浏览文件 @
9092b208
...
...
@@ -175,39 +175,10 @@ static void pneigh_queue_purge(struct sk_buff_head *list)
}
}
void
neigh_changeaddr
(
struct
neigh_table
*
tbl
,
struct
net_device
*
dev
)
static
void
neigh_flush_dev
(
struct
neigh_table
*
tbl
,
struct
net_device
*
dev
)
{
int
i
;
write_lock_bh
(
&
tbl
->
lock
);
for
(
i
=
0
;
i
<=
tbl
->
hash_mask
;
i
++
)
{
struct
neighbour
*
n
,
**
np
;
np
=
&
tbl
->
hash_buckets
[
i
];
while
((
n
=
*
np
)
!=
NULL
)
{
if
(
dev
&&
n
->
dev
!=
dev
)
{
np
=
&
n
->
next
;
continue
;
}
*
np
=
n
->
next
;
write_lock_bh
(
&
n
->
lock
);
n
->
dead
=
1
;
neigh_del_timer
(
n
);
write_unlock_bh
(
&
n
->
lock
);
neigh_release
(
n
);
}
}
write_unlock_bh
(
&
tbl
->
lock
);
}
int
neigh_ifdown
(
struct
neigh_table
*
tbl
,
struct
net_device
*
dev
)
{
int
i
;
write_lock_bh
(
&
tbl
->
lock
);
for
(
i
=
0
;
i
<=
tbl
->
hash_mask
;
i
++
)
{
struct
neighbour
*
n
,
**
np
=
&
tbl
->
hash_buckets
[
i
];
...
...
@@ -243,7 +214,19 @@ int neigh_ifdown(struct neigh_table *tbl, struct net_device *dev)
neigh_release
(
n
);
}
}
}
void
neigh_changeaddr
(
struct
neigh_table
*
tbl
,
struct
net_device
*
dev
)
{
write_lock_bh
(
&
tbl
->
lock
);
neigh_flush_dev
(
tbl
,
dev
);
write_unlock_bh
(
&
tbl
->
lock
);
}
int
neigh_ifdown
(
struct
neigh_table
*
tbl
,
struct
net_device
*
dev
)
{
write_lock_bh
(
&
tbl
->
lock
);
neigh_flush_dev
(
tbl
,
dev
);
pneigh_ifdown
(
tbl
,
dev
);
write_unlock_bh
(
&
tbl
->
lock
);
...
...
@@ -732,6 +715,7 @@ static inline void neigh_add_timer(struct neighbour *n, unsigned long when)
if
(
unlikely
(
mod_timer
(
&
n
->
timer
,
when
)))
{
printk
(
"NEIGH: BUG, double timer add, state is %x
\n
"
,
n
->
nud_state
);
dump_stack
();
}
}
...
...
@@ -815,10 +799,10 @@ static void neigh_timer_handler(unsigned long arg)
}
if
(
neigh
->
nud_state
&
NUD_IN_TIMER
)
{
neigh_hold
(
neigh
);
if
(
time_before
(
next
,
jiffies
+
HZ
/
2
))
next
=
jiffies
+
HZ
/
2
;
neigh_add_timer
(
neigh
,
next
);
if
(
!
mod_timer
(
&
neigh
->
timer
,
next
))
neigh_hold
(
neigh
);
}
if
(
neigh
->
nud_state
&
(
NUD_INCOMPLETE
|
NUD_PROBE
))
{
struct
sk_buff
*
skb
=
skb_peek
(
&
neigh
->
arp_queue
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录