Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
c7c6575f
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看板
提交
c7c6575f
编写于
12月 12, 2011
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'batman-adv/next' of
git://git.open-mesh.org/linux-merge
上级
0850f0f5
b5a1eeef
变更
8
展开全部
隐藏空白更改
内联
并排
Showing
8 changed file
with
216 addition
and
168 deletion
+216
-168
Documentation/networking/batman-adv.txt
Documentation/networking/batman-adv.txt
+4
-3
net/batman-adv/gateway_client.c
net/batman-adv/gateway_client.c
+1
-1
net/batman-adv/icmp_socket.c
net/batman-adv/icmp_socket.c
+4
-10
net/batman-adv/routing.c
net/batman-adv/routing.c
+1
-2
net/batman-adv/soft-interface.c
net/batman-adv/soft-interface.c
+1
-1
net/batman-adv/translation-table.c
net/batman-adv/translation-table.c
+195
-141
net/batman-adv/types.h
net/batman-adv/types.h
+7
-7
net/batman-adv/vis.c
net/batman-adv/vis.c
+3
-3
未找到文件。
Documentation/networking/batman-adv.txt
浏览文件 @
c7c6575f
...
...
@@ -200,15 +200,16 @@ abled during run time. Following log_levels are defined:
0 - All debug output disabled
1 - Enable messages related to routing / flooding / broadcasting
2 - Enable route or tt entry added / changed / deleted
3 - Enable all messages
2 - Enable messages related to route added / changed / deleted
4 - Enable messages related to translation table operations
7 - Enable all messages
The debug output can be changed at runtime using the file
/sys/class/net/bat0/mesh/log_level. e.g.
# echo 2 > /sys/class/net/bat0/mesh/log_level
will enable debug messages for when routes
or TTs
change.
will enable debug messages for when routes change.
BATCTL
...
...
net/batman-adv/gateway_client.c
浏览文件 @
c7c6575f
...
...
@@ -695,7 +695,7 @@ bool gw_out_of_range(struct bat_priv *bat_priv,
}
neigh_old
=
find_router
(
bat_priv
,
orig_dst_node
,
NULL
);
if
(
!
!
neigh_old
)
if
(
!
neigh_old
)
goto
out
;
if
(
curr_tq_avg
-
neigh_old
->
tq_avg
>
GW_THRESHOLD
)
...
...
net/batman-adv/icmp_socket.c
浏览文件 @
c7c6575f
...
...
@@ -136,10 +136,9 @@ static ssize_t bat_socket_read(struct file *file, char __user *buf,
spin_unlock_bh
(
&
socket_client
->
lock
);
error
=
__copy_to_user
(
buf
,
&
socket_packet
->
icmp_packet
,
socket_packet
->
icmp
_len
);
packet_len
=
min
(
count
,
socket_packet
->
icmp_len
);
error
=
copy_to_user
(
buf
,
&
socket_packet
->
icmp_packet
,
packet
_len
);
packet_len
=
socket_packet
->
icmp_len
;
kfree
(
socket_packet
);
if
(
error
)
...
...
@@ -187,12 +186,7 @@ static ssize_t bat_socket_write(struct file *file, const char __user *buff,
skb_reserve
(
skb
,
sizeof
(
struct
ethhdr
));
icmp_packet
=
(
struct
icmp_packet_rr
*
)
skb_put
(
skb
,
packet_len
);
if
(
!
access_ok
(
VERIFY_READ
,
buff
,
packet_len
))
{
len
=
-
EFAULT
;
goto
free_skb
;
}
if
(
__copy_from_user
(
icmp_packet
,
buff
,
packet_len
))
{
if
(
copy_from_user
(
icmp_packet
,
buff
,
packet_len
))
{
len
=
-
EFAULT
;
goto
free_skb
;
}
...
...
@@ -217,7 +211,7 @@ static ssize_t bat_socket_write(struct file *file, const char __user *buff,
if
(
icmp_packet
->
version
!=
COMPAT_VERSION
)
{
icmp_packet
->
msg_type
=
PARAMETER_PROBLEM
;
icmp_packet
->
ttl
=
COMPAT_VERSION
;
icmp_packet
->
version
=
COMPAT_VERSION
;
bat_socket_add_packet
(
socket_client
,
icmp_packet
,
packet_len
);
goto
free_skb
;
}
...
...
net/batman-adv/routing.c
浏览文件 @
c7c6575f
...
...
@@ -627,8 +627,7 @@ int recv_tt_query(struct sk_buff *skb, struct hard_iface *recv_if)
/* Ensure we have all the claimed data */
if
(
unlikely
(
skb_headlen
(
skb
)
<
sizeof
(
struct
tt_query_packet
)
+
tt_len
))
sizeof
(
struct
tt_query_packet
)
+
tt_len
))
goto
out
;
handle_tt_response
(
bat_priv
,
tt_query
);
...
...
net/batman-adv/soft-interface.c
浏览文件 @
c7c6575f
...
...
@@ -874,7 +874,7 @@ struct net_device *softif_create(const char *name)
unreg_sysfs:
sysfs_del_meshif
(
soft_iface
);
unreg_soft_iface:
unregister_netdev
(
soft_iface
);
unregister_netdev
ice
(
soft_iface
);
return
NULL
;
free_soft_iface:
...
...
net/batman-adv/translation-table.c
浏览文件 @
c7c6575f
此差异已折叠。
点击以展开。
net/batman-adv/types.h
浏览文件 @
c7c6575f
...
...
@@ -222,24 +222,24 @@ struct socket_packet {
struct
icmp_packet_rr
icmp_packet
;
};
struct
tt_
local
_entry
{
struct
tt_
common
_entry
{
uint8_t
addr
[
ETH_ALEN
];
struct
hlist_node
hash_entry
;
unsigned
long
last_seen
;
uint16_t
flags
;
atomic_t
refcount
;
struct
rcu_head
rcu
;
};
struct
tt_local_entry
{
struct
tt_common_entry
common
;
unsigned
long
last_seen
;
};
struct
tt_global_entry
{
uint8_t
addr
[
ETH_ALEN
];
struct
hlist_node
hash_entry
;
/* entry in the global table */
struct
tt_common_entry
common
;
struct
orig_node
*
orig_node
;
uint8_t
ttvn
;
uint16_t
flags
;
/* only TT_GLOBAL_ROAM is used */
unsigned
long
roam_at
;
/* time at which TT_GLOBAL_ROAM was set */
atomic_t
refcount
;
struct
rcu_head
rcu
;
};
struct
tt_change_node
{
...
...
net/batman-adv/vis.c
浏览文件 @
c7c6575f
...
...
@@ -609,7 +609,7 @@ static int generate_vis_packet(struct bat_priv *bat_priv)
struct
vis_info
*
info
=
bat_priv
->
my_vis_info
;
struct
vis_packet
*
packet
=
(
struct
vis_packet
*
)
info
->
skb_packet
->
data
;
struct
vis_info_entry
*
entry
;
struct
tt_
local_entry
*
tt_local
_entry
;
struct
tt_
common_entry
*
tt_common
_entry
;
int
best_tq
=
-
1
;
uint32_t
i
;
...
...
@@ -672,13 +672,13 @@ static int generate_vis_packet(struct bat_priv *bat_priv)
head
=
&
hash
->
table
[
i
];
rcu_read_lock
();
hlist_for_each_entry_rcu
(
tt_
local
_entry
,
node
,
head
,
hlist_for_each_entry_rcu
(
tt_
common
_entry
,
node
,
head
,
hash_entry
)
{
entry
=
(
struct
vis_info_entry
*
)
skb_put
(
info
->
skb_packet
,
sizeof
(
*
entry
));
memset
(
entry
->
src
,
0
,
ETH_ALEN
);
memcpy
(
entry
->
dest
,
tt_
local
_entry
->
addr
,
ETH_ALEN
);
memcpy
(
entry
->
dest
,
tt_
common
_entry
->
addr
,
ETH_ALEN
);
entry
->
quality
=
0
;
/* 0 means TT */
packet
->
entries
++
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录