Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
d8ac1063
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
152
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d8ac1063
编写于
9月 13, 2005
作者:
L
Linus Torvalds
浏览文件
操作
浏览文件
下载
差异文件
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
上级
b24fd48a
033d9744
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
130 addition
and
36 deletion
+130
-36
drivers/bluetooth/hci_usb.c
drivers/bluetooth/hci_usb.c
+18
-1
drivers/bluetooth/hci_usb.h
drivers/bluetooth/hci_usb.h
+3
-2
include/net/bluetooth/hci.h
include/net/bluetooth/hci.h
+11
-0
net/bluetooth/hci_event.c
net/bluetooth/hci_event.c
+33
-0
net/bluetooth/rfcomm/sock.c
net/bluetooth/rfcomm/sock.c
+25
-5
net/dccp/input.c
net/dccp/input.c
+8
-1
net/ipv4/netfilter/ip_conntrack_ftp.c
net/ipv4/netfilter/ip_conntrack_ftp.c
+3
-3
net/ipv4/netfilter/ip_conntrack_irc.c
net/ipv4/netfilter/ip_conntrack_irc.c
+3
-3
net/ipv4/netfilter/ip_conntrack_netbios_ns.c
net/ipv4/netfilter/ip_conntrack_netbios_ns.c
+7
-12
net/ipv4/netfilter/ip_conntrack_tftp.c
net/ipv4/netfilter/ip_conntrack_tftp.c
+3
-3
net/ipv4/netfilter/ipt_MASQUERADE.c
net/ipv4/netfilter/ipt_MASQUERADE.c
+6
-0
net/ipv4/netfilter/ipt_REDIRECT.c
net/ipv4/netfilter/ipt_REDIRECT.c
+10
-6
未找到文件。
drivers/bluetooth/hci_usb.c
浏览文件 @
d8ac1063
...
...
@@ -65,13 +65,15 @@
#endif
static
int
ignore
=
0
;
static
int
ignore_csr
=
0
;
static
int
ignore_sniffer
=
0
;
static
int
reset
=
0
;
#ifdef CONFIG_BT_HCIUSB_SCO
static
int
isoc
=
2
;
#endif
#define VERSION "2.
8
"
#define VERSION "2.
9
"
static
struct
usb_driver
hci_usb_driver
;
...
...
@@ -98,6 +100,9 @@ static struct usb_device_id bluetooth_ids[] = {
MODULE_DEVICE_TABLE
(
usb
,
bluetooth_ids
);
static
struct
usb_device_id
blacklist_ids
[]
=
{
/* CSR BlueCore devices */
{
USB_DEVICE
(
0x0a12
,
0x0001
),
.
driver_info
=
HCI_CSR
},
/* Broadcom BCM2033 without firmware */
{
USB_DEVICE
(
0x0a5c
,
0x2033
),
.
driver_info
=
HCI_IGNORE
},
...
...
@@ -836,6 +841,12 @@ static int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id
if
(
ignore
||
id
->
driver_info
&
HCI_IGNORE
)
return
-
ENODEV
;
if
(
ignore_csr
&&
id
->
driver_info
&
HCI_CSR
)
return
-
ENODEV
;
if
(
ignore_sniffer
&&
id
->
driver_info
&
HCI_SNIFFER
)
return
-
ENODEV
;
if
(
intf
->
cur_altsetting
->
desc
.
bInterfaceNumber
>
0
)
return
-
ENODEV
;
...
...
@@ -1061,6 +1072,12 @@ module_exit(hci_usb_exit);
module_param
(
ignore
,
bool
,
0644
);
MODULE_PARM_DESC
(
ignore
,
"Ignore devices from the matching table"
);
module_param
(
ignore_csr
,
bool
,
0644
);
MODULE_PARM_DESC
(
ignore_csr
,
"Ignore devices with id 0a12:0001"
);
module_param
(
ignore_sniffer
,
bool
,
0644
);
MODULE_PARM_DESC
(
ignore_sniffer
,
"Ignore devices with id 0a12:0002"
);
module_param
(
reset
,
bool
,
0644
);
MODULE_PARM_DESC
(
reset
,
"Send HCI reset command on initialization"
);
...
...
drivers/bluetooth/hci_usb.h
浏览文件 @
d8ac1063
...
...
@@ -31,9 +31,10 @@
#define HCI_IGNORE 0x01
#define HCI_RESET 0x02
#define HCI_DIGIANSWER 0x04
#define HCI_
SNIFFER
0x08
#define HCI_
BROKEN_ISOC
0x10
#define HCI_
CSR
0x08
#define HCI_
SNIFFER
0x10
#define HCI_BCM92035 0x20
#define HCI_BROKEN_ISOC 0x40
#define HCI_MAX_IFACE_NUM 3
...
...
include/net/bluetooth/hci.h
浏览文件 @
d8ac1063
...
...
@@ -463,6 +463,17 @@ struct inquiry_info_with_rssi_and_pscan_mode {
__s8
rssi
;
}
__attribute__
((
packed
));
#define HCI_EV_EXTENDED_INQUIRY_RESULT 0x2F
struct
extended_inquiry_info
{
bdaddr_t
bdaddr
;
__u8
pscan_rep_mode
;
__u8
pscan_period_mode
;
__u8
dev_class
[
3
];
__u16
clock_offset
;
__s8
rssi
;
__u8
data
[
240
];
}
__attribute__
((
packed
));
#define HCI_EV_CONN_COMPLETE 0x03
struct
hci_ev_conn_complete
{
__u8
status
;
...
...
net/bluetooth/hci_event.c
浏览文件 @
d8ac1063
...
...
@@ -558,6 +558,35 @@ static inline void hci_inquiry_result_with_rssi_evt(struct hci_dev *hdev, struct
hci_dev_unlock
(
hdev
);
}
/* Extended Inquiry Result */
static
inline
void
hci_extended_inquiry_result_evt
(
struct
hci_dev
*
hdev
,
struct
sk_buff
*
skb
)
{
struct
inquiry_data
data
;
struct
extended_inquiry_info
*
info
=
(
struct
extended_inquiry_info
*
)
(
skb
->
data
+
1
);
int
num_rsp
=
*
((
__u8
*
)
skb
->
data
);
BT_DBG
(
"%s num_rsp %d"
,
hdev
->
name
,
num_rsp
);
if
(
!
num_rsp
)
return
;
hci_dev_lock
(
hdev
);
for
(;
num_rsp
;
num_rsp
--
)
{
bacpy
(
&
data
.
bdaddr
,
&
info
->
bdaddr
);
data
.
pscan_rep_mode
=
info
->
pscan_rep_mode
;
data
.
pscan_period_mode
=
info
->
pscan_period_mode
;
data
.
pscan_mode
=
0x00
;
memcpy
(
data
.
dev_class
,
info
->
dev_class
,
3
);
data
.
clock_offset
=
info
->
clock_offset
;
data
.
rssi
=
info
->
rssi
;
info
++
;
hci_inquiry_cache_update
(
hdev
,
&
data
);
}
hci_dev_unlock
(
hdev
);
}
/* Connect Request */
static
inline
void
hci_conn_request_evt
(
struct
hci_dev
*
hdev
,
struct
sk_buff
*
skb
)
{
...
...
@@ -940,6 +969,10 @@ void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb)
hci_inquiry_result_with_rssi_evt
(
hdev
,
skb
);
break
;
case
HCI_EV_EXTENDED_INQUIRY_RESULT
:
hci_extended_inquiry_result_evt
(
hdev
,
skb
);
break
;
case
HCI_EV_CONN_REQUEST
:
hci_conn_request_evt
(
hdev
,
skb
);
break
;
...
...
net/bluetooth/rfcomm/sock.c
浏览文件 @
d8ac1063
...
...
@@ -363,6 +363,11 @@ static int rfcomm_sock_bind(struct socket *sock, struct sockaddr *addr, int addr
goto
done
;
}
if
(
sk
->
sk_type
!=
SOCK_STREAM
)
{
err
=
-
EINVAL
;
goto
done
;
}
write_lock_bh
(
&
rfcomm_sk_list
.
lock
);
if
(
sa
->
rc_channel
&&
__rfcomm_get_sock_by_addr
(
sa
->
rc_channel
,
&
sa
->
rc_bdaddr
))
{
...
...
@@ -393,13 +398,17 @@ static int rfcomm_sock_connect(struct socket *sock, struct sockaddr *addr, int a
if
(
addr
->
sa_family
!=
AF_BLUETOOTH
||
alen
<
sizeof
(
struct
sockaddr_rc
))
return
-
EINVAL
;
if
(
sk
->
sk_state
!=
BT_OPEN
&&
sk
->
sk_state
!=
BT_BOUND
)
return
-
EBADFD
;
lock_sock
(
sk
);
if
(
sk
->
sk_type
!=
SOCK_STREAM
)
return
-
EINVAL
;
if
(
sk
->
sk_state
!=
BT_OPEN
&&
sk
->
sk_state
!=
BT_BOUND
)
{
err
=
-
EBADFD
;
goto
done
;
}
lock_sock
(
sk
);
if
(
sk
->
sk_type
!=
SOCK_STREAM
)
{
err
=
-
EINVAL
;
goto
done
;
}
sk
->
sk_state
=
BT_CONNECT
;
bacpy
(
&
bt_sk
(
sk
)
->
dst
,
&
sa
->
rc_bdaddr
);
...
...
@@ -410,6 +419,7 @@ static int rfcomm_sock_connect(struct socket *sock, struct sockaddr *addr, int a
err
=
bt_sock_wait_state
(
sk
,
BT_CONNECTED
,
sock_sndtimeo
(
sk
,
flags
&
O_NONBLOCK
));
done:
release_sock
(
sk
);
return
err
;
}
...
...
@@ -428,6 +438,11 @@ static int rfcomm_sock_listen(struct socket *sock, int backlog)
goto
done
;
}
if
(
sk
->
sk_type
!=
SOCK_STREAM
)
{
err
=
-
EINVAL
;
goto
done
;
}
if
(
!
rfcomm_pi
(
sk
)
->
channel
)
{
bdaddr_t
*
src
=
&
bt_sk
(
sk
)
->
src
;
u8
channel
;
...
...
@@ -472,6 +487,11 @@ static int rfcomm_sock_accept(struct socket *sock, struct socket *newsock, int f
goto
done
;
}
if
(
sk
->
sk_type
!=
SOCK_STREAM
)
{
err
=
-
EINVAL
;
goto
done
;
}
timeo
=
sock_rcvtimeo
(
sk
,
flags
&
O_NONBLOCK
);
BT_DBG
(
"sk %p timeo %ld"
,
sk
,
timeo
);
...
...
net/dccp/input.c
浏览文件 @
d8ac1063
...
...
@@ -50,7 +50,8 @@ static void dccp_rcv_closereq(struct sock *sk, struct sk_buff *skb)
return
;
}
dccp_set_state
(
sk
,
DCCP_CLOSING
);
if
(
sk
->
sk_state
!=
DCCP_CLOSING
)
dccp_set_state
(
sk
,
DCCP_CLOSING
);
dccp_send_close
(
sk
,
0
);
}
...
...
@@ -561,6 +562,12 @@ int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
return
0
;
}
if
(
unlikely
(
dh
->
dccph_type
==
DCCP_PKT_SYNC
))
{
dccp_send_sync
(
sk
,
DCCP_SKB_CB
(
skb
)
->
dccpd_seq
,
DCCP_PKT_SYNCACK
);
goto
discard
;
}
switch
(
sk
->
sk_state
)
{
case
DCCP_CLOSED
:
return
1
;
...
...
net/ipv4/netfilter/ip_conntrack_ftp.c
浏览文件 @
d8ac1063
...
...
@@ -29,9 +29,9 @@ static char *ftp_buffer;
static
DEFINE_SPINLOCK
(
ip_ftp_lock
);
#define MAX_PORTS 8
static
in
t
ports
[
MAX_PORTS
];
static
shor
t
ports
[
MAX_PORTS
];
static
int
ports_c
;
module_param_array
(
ports
,
in
t
,
&
ports_c
,
0400
);
module_param_array
(
ports
,
shor
t
,
&
ports_c
,
0400
);
static
int
loose
;
module_param
(
loose
,
int
,
0600
);
...
...
@@ -450,7 +450,7 @@ static int help(struct sk_buff **pskb,
}
static
struct
ip_conntrack_helper
ftp
[
MAX_PORTS
];
static
char
ftp_names
[
MAX_PORTS
][
10
];
static
char
ftp_names
[
MAX_PORTS
][
sizeof
(
"ftp-65535"
)
];
/* Not __exit: called from init() */
static
void
fini
(
void
)
...
...
net/ipv4/netfilter/ip_conntrack_irc.c
浏览文件 @
d8ac1063
...
...
@@ -34,7 +34,7 @@
#include <linux/moduleparam.h>
#define MAX_PORTS 8
static
in
t
ports
[
MAX_PORTS
];
static
shor
t
ports
[
MAX_PORTS
];
static
int
ports_c
;
static
int
max_dcc_channels
=
8
;
static
unsigned
int
dcc_timeout
=
300
;
...
...
@@ -52,7 +52,7 @@ EXPORT_SYMBOL_GPL(ip_nat_irc_hook);
MODULE_AUTHOR
(
"Harald Welte <laforge@netfilter.org>"
);
MODULE_DESCRIPTION
(
"IRC (DCC) connection tracking helper"
);
MODULE_LICENSE
(
"GPL"
);
module_param_array
(
ports
,
in
t
,
&
ports_c
,
0400
);
module_param_array
(
ports
,
shor
t
,
&
ports_c
,
0400
);
MODULE_PARM_DESC
(
ports
,
"port numbers of IRC servers"
);
module_param
(
max_dcc_channels
,
int
,
0400
);
MODULE_PARM_DESC
(
max_dcc_channels
,
"max number of expected DCC channels per IRC session"
);
...
...
@@ -240,7 +240,7 @@ static int help(struct sk_buff **pskb,
}
static
struct
ip_conntrack_helper
irc_helpers
[
MAX_PORTS
];
static
char
irc_names
[
MAX_PORTS
][
10
];
static
char
irc_names
[
MAX_PORTS
][
sizeof
(
"irc-65535"
)
];
static
void
fini
(
void
);
...
...
net/ipv4/netfilter/ip_conntrack_netbios_ns.c
浏览文件 @
d8ac1063
...
...
@@ -23,7 +23,6 @@
#include <linux/inetdevice.h>
#include <linux/in.h>
#include <linux/ip.h>
#include <linux/udp.h>
#include <net/route.h>
#include <linux/netfilter.h>
...
...
@@ -31,6 +30,8 @@
#include <linux/netfilter_ipv4/ip_conntrack.h>
#include <linux/netfilter_ipv4/ip_conntrack_helper.h>
#define NMBD_PORT 137
MODULE_AUTHOR
(
"Patrick McHardy <kaber@trash.net>"
);
MODULE_DESCRIPTION
(
"NetBIOS name service broadcast connection tracking helper"
);
MODULE_LICENSE
(
"GPL"
);
...
...
@@ -44,7 +45,6 @@ static int help(struct sk_buff **pskb,
{
struct
ip_conntrack_expect
*
exp
;
struct
iphdr
*
iph
=
(
*
pskb
)
->
nh
.
iph
;
struct
udphdr
_uh
,
*
uh
;
struct
rtable
*
rt
=
(
struct
rtable
*
)(
*
pskb
)
->
dst
;
struct
in_device
*
in_dev
;
u_int32_t
mask
=
0
;
...
...
@@ -72,20 +72,15 @@ static int help(struct sk_buff **pskb,
if
(
mask
==
0
)
goto
out
;
uh
=
skb_header_pointer
(
*
pskb
,
iph
->
ihl
*
4
,
sizeof
(
_uh
),
&
_uh
);
BUG_ON
(
uh
==
NULL
);
exp
=
ip_conntrack_expect_alloc
(
ct
);
if
(
exp
==
NULL
)
goto
out
;
memset
(
&
exp
->
tuple
,
0
,
sizeof
(
exp
->
tuple
));
exp
->
tuple
.
src
.
ip
=
iph
->
daddr
&
mask
;
exp
->
tuple
.
dst
.
ip
=
iph
->
saddr
;
exp
->
tuple
.
dst
.
u
.
udp
.
port
=
uh
->
source
;
exp
->
tuple
.
dst
.
protonum
=
IPPROTO_UDP
;
memset
(
&
exp
->
mask
,
0
,
sizeof
(
exp
->
mask
));
exp
->
tuple
=
ct
->
tuplehash
[
IP_CT_DIR_REPLY
].
tuple
;
exp
->
tuple
.
src
.
u
.
udp
.
port
=
ntohs
(
NMBD_PORT
);
exp
->
mask
.
src
.
ip
=
mask
;
exp
->
mask
.
src
.
u
.
udp
.
port
=
0xFFFF
;
exp
->
mask
.
dst
.
ip
=
0xFFFFFFFF
;
exp
->
mask
.
dst
.
u
.
udp
.
port
=
0xFFFF
;
exp
->
mask
.
dst
.
protonum
=
0xFF
;
...
...
@@ -107,7 +102,7 @@ static struct ip_conntrack_helper helper = {
.
src
=
{
.
u
=
{
.
udp
=
{
.
port
=
__constant_htons
(
137
),
.
port
=
__constant_htons
(
NMBD_PORT
),
}
}
},
...
...
net/ipv4/netfilter/ip_conntrack_tftp.c
浏览文件 @
d8ac1063
...
...
@@ -26,9 +26,9 @@ MODULE_DESCRIPTION("tftp connection tracking helper");
MODULE_LICENSE
(
"GPL"
);
#define MAX_PORTS 8
static
in
t
ports
[
MAX_PORTS
];
static
shor
t
ports
[
MAX_PORTS
];
static
int
ports_c
;
module_param_array
(
ports
,
in
t
,
&
ports_c
,
0400
);
module_param_array
(
ports
,
shor
t
,
&
ports_c
,
0400
);
MODULE_PARM_DESC
(
ports
,
"port numbers of tftp servers"
);
#if 0
...
...
@@ -100,7 +100,7 @@ static int tftp_help(struct sk_buff **pskb,
}
static
struct
ip_conntrack_helper
tftp
[
MAX_PORTS
];
static
char
tftp_names
[
MAX_PORTS
][
10
];
static
char
tftp_names
[
MAX_PORTS
][
sizeof
(
"tftp-65535"
)
];
static
void
fini
(
void
)
{
...
...
net/ipv4/netfilter/ipt_MASQUERADE.c
浏览文件 @
d8ac1063
...
...
@@ -90,6 +90,12 @@ masquerade_target(struct sk_buff **pskb,
IP_NF_ASSERT
(
ct
&&
(
ctinfo
==
IP_CT_NEW
||
ctinfo
==
IP_CT_RELATED
||
ctinfo
==
IP_CT_RELATED
+
IP_CT_IS_REPLY
));
/* Source address is 0.0.0.0 - locally generated packet that is
* probably not supposed to be masqueraded.
*/
if
(
ct
->
tuplehash
[
IP_CT_DIR_ORIGINAL
].
tuple
.
src
.
ip
==
0
)
return
NF_ACCEPT
;
mr
=
targinfo
;
rt
=
(
struct
rtable
*
)(
*
pskb
)
->
dst
;
newsrc
=
inet_select_addr
(
out
,
rt
->
rt_gateway
,
RT_SCOPE_UNIVERSE
);
...
...
net/ipv4/netfilter/ipt_REDIRECT.c
浏览文件 @
d8ac1063
...
...
@@ -88,14 +88,18 @@ redirect_target(struct sk_buff **pskb,
newdst
=
htonl
(
0x7F000001
);
else
{
struct
in_device
*
indev
;
struct
in_ifaddr
*
ifa
;
/* Device might not have an associated in_device. */
indev
=
(
struct
in_device
*
)(
*
pskb
)
->
dev
->
ip_ptr
;
if
(
indev
==
NULL
||
indev
->
ifa_list
==
NULL
)
return
NF_DROP
;
newdst
=
0
;
rcu_read_lock
();
indev
=
__in_dev_get
((
*
pskb
)
->
dev
);
if
(
indev
&&
(
ifa
=
indev
->
ifa_list
))
newdst
=
ifa
->
ifa_local
;
rcu_read_unlock
();
/* Grab first address on interface. */
newdst
=
indev
->
ifa_list
->
ifa_local
;
if
(
!
newdst
)
return
NF_DROP
;
}
/* Transfer from original range. */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录