Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
2a044515
K
Kernel
项目概览
openeuler
/
Kernel
12 个月 前同步成功
通知
5
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2a044515
编写于
9月 10, 2005
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
差异文件
Merge davem@outer-richmond.davemloft.net:src/GIT/net-2.6/
上级
2625c1be
e6df439b
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
115 addition
and
135 deletion
+115
-135
include/linux/in6.h
include/linux/in6.h
+36
-20
include/linux/ipv6.h
include/linux/ipv6.h
+1
-1
net/dccp/ccids/ccid3.c
net/dccp/ccids/ccid3.c
+68
-98
net/dccp/ccids/ccid3.h
net/dccp/ccids/ccid3.h
+2
-0
net/dccp/ipv4.c
net/dccp/ipv4.c
+0
-4
net/dccp/output.c
net/dccp/output.c
+0
-3
net/ipv6/exthdrs.c
net/ipv6/exthdrs.c
+1
-2
net/ipv6/netfilter/ip6t_rt.c
net/ipv6/netfilter/ip6t_rt.c
+7
-7
未找到文件。
include/linux/in6.h
浏览文件 @
2a044515
...
...
@@ -198,27 +198,43 @@ struct in6_flowlabel_req
* MCAST_MSFILTER 48
*/
/* RFC3542 advanced socket options (50-67) */
#define IPV6_RECVPKTINFO 50
#define IPV6_PKTINFO 51
#if 0
#define IPV6_RECVPATHMTU 52
#define IPV6_PATHMTU 53
#define IPV6_DONTFRAG 54
#define IPV6_USE_MIN_MTU 55
#endif
#define IPV6_RECVHOPOPTS 56
#define IPV6_HOPOPTS 57
#if 0
#define IPV6_RECVRTHDRDSTOPTS 58 /* Unused, see net/ipv6/datagram.c */
/*
* Advanced API (RFC3542) (1)
*
* Note: IPV6_RECVRTHDRDSTOPTS does not exist. see net/ipv6/datagram.c.
*/
#define IPV6_RECVPKTINFO 49
#define IPV6_PKTINFO 50
#define IPV6_RECVHOPLIMIT 51
#define IPV6_HOPLIMIT 52
#define IPV6_RECVHOPOPTS 53
#define IPV6_HOPOPTS 54
#define IPV6_RTHDRDSTOPTS 55
#define IPV6_RECVRTHDR 56
#define IPV6_RTHDR 57
#define IPV6_RECVDSTOPTS 58
#define IPV6_DSTOPTS 59
#if 0 /* not yet */
#define IPV6_RECVPATHMTU 60
#define IPV6_PATHMTU 61
#define IPV6_DONTFRAG 62
#define IPV6_USE_MIN_MTU 63
#endif
#define IPV6_RTHDRDSTOPTS 59
#define IPV6_RECVRTHDR 60
#define IPV6_RTHDR 61
#define IPV6_RECVDSTOPTS 62
#define IPV6_DSTOPTS 63
#define IPV6_RECVHOPLIMIT 64
#define IPV6_HOPLIMIT 65
/*
* Netfilter
*
* Following socket options are used in ip6_tables;
* see include/linux/netfilter_ipv6/ip6_tables.h.
*
* IP6T_SO_SET_REPLACE / IP6T_SO_GET_INFO 64
* IP6T_SO_SET_ADD_COUNTERS / IP6T_SO_GET_ENTRIES 65
*/
/*
* Advanced API (RFC3542) (2)
*/
#define IPV6_RECVTCLASS 66
#define IPV6_TCLASS 67
...
...
include/linux/ipv6.h
浏览文件 @
2a044515
...
...
@@ -68,7 +68,7 @@ struct ipv6_opt_hdr {
struct
rt0_hdr
{
struct
ipv6_rt_hdr
rt_hdr
;
__u32
bitmap
;
/* strict/loose bit map */
__u32
reserved
;
struct
in6_addr
addr
[
0
];
#define rt0_type rt_hdr.type
...
...
net/dccp/ccids/ccid3.c
浏览文件 @
2a044515
...
...
@@ -78,13 +78,11 @@ static struct dccp_li_hist *ccid3_li_hist;
static
int
ccid3_init
(
struct
sock
*
sk
)
{
ccid3_pr_debug
(
"%s, sk=%p
\n
"
,
dccp_role
(
sk
),
sk
);
return
0
;
}
static
void
ccid3_exit
(
struct
sock
*
sk
)
{
ccid3_pr_debug
(
"%s, sk=%p
\n
"
,
dccp_role
(
sk
),
sk
);
}
/* TFRC sender states */
...
...
@@ -287,14 +285,14 @@ static int ccid3_hc_tx_send_packet(struct sock *sk,
long
delay
;
int
rc
=
-
ENOTCONN
;
/* Check if pure ACK or Terminating*/
BUG_ON
(
hctx
==
NULL
||
hctx
->
ccid3hctx_state
==
TFRC_SSTATE_TERM
);
/* Check if pure ACK or Terminating*/
/*
* XXX: We only call this function for DATA and DATAACK, on, these
* packets can have zero length, but why the comment about "pure ACK"?
*/
if
(
hctx
==
NULL
||
len
==
0
||
hctx
->
ccid3hctx_state
==
TFRC_SSTATE_TERM
)
if
(
unlikely
(
len
==
0
))
goto
out
;
/* See if last packet allocated was not sent */
...
...
@@ -304,10 +302,10 @@ static int ccid3_hc_tx_send_packet(struct sock *sk,
SLAB_ATOMIC
);
rc
=
-
ENOBUFS
;
if
(
new_packet
==
NULL
)
{
ccid3_pr_debug
(
"%s, sk=%p, not enough mem to add
"
"to history, send refused
\n
"
,
dccp_role
(
sk
),
sk
);
if
(
unlikely
(
new_packet
==
NULL
)
)
{
LIMIT_NETDEBUG
(
KERN_WARNING
"%s: %s, sk=%p, not enough
"
"
mem to add
to history, send refused
\n
"
,
__FUNCTION__
,
dccp_role
(
sk
),
sk
);
goto
out
;
}
...
...
@@ -318,9 +316,6 @@ static int ccid3_hc_tx_send_packet(struct sock *sk,
switch
(
hctx
->
ccid3hctx_state
)
{
case
TFRC_SSTATE_NO_SENT
:
ccid3_pr_debug
(
"%s, sk=%p, first packet(%llu)
\n
"
,
dccp_role
(
sk
),
sk
,
dp
->
dccps_gss
);
hctx
->
ccid3hctx_no_feedback_timer
.
function
=
ccid3_hc_tx_no_feedback_timer
;
hctx
->
ccid3hctx_no_feedback_timer
.
data
=
(
unsigned
long
)
sk
;
sk_reset_timer
(
sk
,
&
hctx
->
ccid3hctx_no_feedback_timer
,
...
...
@@ -328,7 +323,7 @@ static int ccid3_hc_tx_send_packet(struct sock *sk,
hctx
->
ccid3hctx_last_win_count
=
0
;
hctx
->
ccid3hctx_t_last_win_count
=
now
;
ccid3_hc_tx_set_state
(
sk
,
TFRC_SSTATE_NO_FBACK
);
hctx
->
ccid3hctx_t_ipi
=
TFRC_INITIAL_
TIMEOUT
;
hctx
->
ccid3hctx_t_ipi
=
TFRC_INITIAL_
IPI
;
/* Set nominal send time for initial packet */
hctx
->
ccid3hctx_t_nom
=
now
;
...
...
@@ -341,7 +336,6 @@ static int ccid3_hc_tx_send_packet(struct sock *sk,
case
TFRC_SSTATE_FBACK
:
delay
=
(
timeval_delta
(
&
now
,
&
hctx
->
ccid3hctx_t_nom
)
-
hctx
->
ccid3hctx_delta
);
ccid3_pr_debug
(
"send_packet delay=%ld
\n
"
,
delay
);
delay
/=
-
1000
;
/* divide by -1000 is to convert to ms and get sign right */
rc
=
delay
>
0
?
delay
:
0
;
...
...
@@ -371,13 +365,7 @@ static void ccid3_hc_tx_packet_sent(struct sock *sk, int more, int len)
struct
ccid3_hc_tx_sock
*
hctx
=
ccid3_hc_tx_sk
(
sk
);
struct
timeval
now
;
BUG_ON
(
hctx
==
NULL
);
if
(
hctx
->
ccid3hctx_state
==
TFRC_SSTATE_TERM
)
{
ccid3_pr_debug
(
"%s, sk=%p, while state is TFRC_SSTATE_TERM!
\n
"
,
dccp_role
(
sk
),
sk
);
return
;
}
BUG_ON
(
hctx
==
NULL
||
hctx
->
ccid3hctx_state
==
TFRC_SSTATE_TERM
);
dccp_timestamp
(
sk
,
&
now
);
...
...
@@ -387,14 +375,14 @@ static void ccid3_hc_tx_packet_sent(struct sock *sk, int more, int len)
struct
dccp_tx_hist_entry
*
packet
;
packet
=
dccp_tx_hist_head
(
&
hctx
->
ccid3hctx_hist
);
if
(
packet
==
NULL
)
{
printk
(
KERN_CRIT
"%s: packet doesn't exists in
"
"
history!
\n
"
,
__FUNCTION__
);
if
(
unlikely
(
packet
==
NULL
)
)
{
LIMIT_NETDEBUG
(
KERN_WARNING
"%s: packet doesn't
"
"exists in
history!
\n
"
,
__FUNCTION__
);
return
;
}
if
(
packet
->
dccphtx_sent
)
{
printk
(
KERN_CRIT
"%s: no unsent packet in history!
\n
"
,
__FUNCTION__
);
if
(
unlikely
(
packet
->
dccphtx_sent
)
)
{
LIMIT_NETDEBUG
(
KERN_WARNING
"%s: no unsent packet in "
"history!
\n
"
,
__FUNCTION__
);
return
;
}
packet
->
dccphtx_tstamp
=
now
;
...
...
@@ -465,14 +453,7 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
u32
x_recv
;
u32
r_sample
;
if
(
hctx
==
NULL
)
return
;
if
(
hctx
->
ccid3hctx_state
==
TFRC_SSTATE_TERM
)
{
ccid3_pr_debug
(
"%s, sk=%p, received a packet when "
"terminating!
\n
"
,
dccp_role
(
sk
),
sk
);
return
;
}
BUG_ON
(
hctx
==
NULL
||
hctx
->
ccid3hctx_state
==
TFRC_SSTATE_TERM
);
/* we are only interested in ACKs */
if
(
!
(
DCCP_SKB_CB
(
skb
)
->
dccpd_type
==
DCCP_PKT_ACK
||
...
...
@@ -496,12 +477,12 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
/* get t_recvdata from history */
packet
=
dccp_tx_hist_find_entry
(
&
hctx
->
ccid3hctx_hist
,
DCCP_SKB_CB
(
skb
)
->
dccpd_ack_seq
);
if
(
packet
==
NULL
)
{
ccid3_pr_debug
(
"%s, sk=%p, seqno %llu(%s) does't
"
"exist in history!
\n
"
,
dccp_role
(
sk
),
sk
,
DCCP_SKB_CB
(
skb
)
->
dccpd_ack_seq
,
dccp_packet_name
(
DCCP_SKB_CB
(
skb
)
->
dccpd_type
));
if
(
unlikely
(
packet
==
NULL
)
)
{
LIMIT_NETDEBUG
(
KERN_WARNING
"%s: %s, sk=%p, seqno
"
"
%llu(%s) does't
exist in history!
\n
"
,
__FUNCTION__
,
dccp_role
(
sk
),
sk
,
(
unsigned
long
long
)
DCCP_SKB_CB
(
skb
)
->
dccpd_ack_seq
,
dccp_packet_name
(
DCCP_SKB_CB
(
skb
)
->
dccpd_type
));
return
;
}
...
...
@@ -509,8 +490,8 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
dccp_timestamp
(
sk
,
&
now
);
r_sample
=
timeval_delta
(
&
now
,
&
packet
->
dccphtx_tstamp
);
if
(
unlikely
(
r_sample
<=
t_elapsed
))
LIMIT_NETDEBUG
(
KERN_WARNING
"
%s: r_sample=%uus,
t_elapsed=%uus
\n
"
,
LIMIT_NETDEBUG
(
KERN_WARNING
"%s: r_sample=%uus, "
"t_elapsed=%uus
\n
"
,
__FUNCTION__
,
r_sample
,
t_elapsed
);
else
r_sample
-=
t_elapsed
;
...
...
@@ -606,10 +587,11 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
static
void
ccid3_hc_tx_insert_options
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
)
{
struct
ccid3_hc_tx_sock
*
hctx
=
ccid3_hc_tx_sk
(
sk
);
const
struct
ccid3_hc_tx_sock
*
hctx
=
ccid3_hc_tx_sk
(
sk
);
if
(
hctx
==
NULL
||
!
(
sk
->
sk_state
==
DCCP_OPEN
||
sk
->
sk_state
==
DCCP_PARTOPEN
))
BUG_ON
(
hctx
==
NULL
);
if
(
!
(
sk
->
sk_state
==
DCCP_OPEN
||
sk
->
sk_state
==
DCCP_PARTOPEN
))
return
;
DCCP_SKB_CB
(
skb
)
->
dccpd_ccval
=
hctx
->
ccid3hctx_last_win_count
;
...
...
@@ -624,8 +606,7 @@ static int ccid3_hc_tx_parse_options(struct sock *sk, unsigned char option,
struct
ccid3_hc_tx_sock
*
hctx
=
ccid3_hc_tx_sk
(
sk
);
struct
ccid3_options_received
*
opt_recv
;
if
(
hctx
==
NULL
)
return
0
;
BUG_ON
(
hctx
==
NULL
);
opt_recv
=
&
hctx
->
ccid3hctx_options_received
;
...
...
@@ -639,10 +620,10 @@ static int ccid3_hc_tx_parse_options(struct sock *sk, unsigned char option,
switch
(
option
)
{
case
TFRC_OPT_LOSS_EVENT_RATE
:
if
(
len
!=
4
)
{
ccid3_pr_debug
(
"%s, sk=%p, invalid len for
"
"TFRC_OPT_LOSS_EVENT_RATE
\n
"
,
dccp_role
(
sk
),
sk
);
if
(
unlikely
(
len
!=
4
)
)
{
LIMIT_NETDEBUG
(
KERN_WARNING
"%s: %s, sk=%p, invalid
"
"
len for
TFRC_OPT_LOSS_EVENT_RATE
\n
"
,
__FUNCTION__
,
dccp_role
(
sk
),
sk
);
rc
=
-
EINVAL
;
}
else
{
opt_recv
->
ccid3or_loss_event_rate
=
ntohl
(
*
(
u32
*
)
value
);
...
...
@@ -660,10 +641,10 @@ static int ccid3_hc_tx_parse_options(struct sock *sk, unsigned char option,
opt_recv
->
ccid3or_loss_intervals_len
);
break
;
case
TFRC_OPT_RECEIVE_RATE
:
if
(
len
!=
4
)
{
ccid3_pr_debug
(
"%s, sk=%p, invalid len for
"
"TFRC_OPT_RECEIVE_RATE
\n
"
,
dccp_role
(
sk
),
sk
);
if
(
unlikely
(
len
!=
4
)
)
{
LIMIT_NETDEBUG
(
KERN_WARNING
"%s: %s, sk=%p, invalid
"
"
len for
TFRC_OPT_RECEIVE_RATE
\n
"
,
__FUNCTION__
,
dccp_role
(
sk
),
sk
);
rc
=
-
EINVAL
;
}
else
{
opt_recv
->
ccid3or_receive_rate
=
ntohl
(
*
(
u32
*
)
value
);
...
...
@@ -682,8 +663,6 @@ static int ccid3_hc_tx_init(struct sock *sk)
struct
dccp_sock
*
dp
=
dccp_sk
(
sk
);
struct
ccid3_hc_tx_sock
*
hctx
;
ccid3_pr_debug
(
"%s, sk=%p
\n
"
,
dccp_role
(
sk
),
sk
);
dp
->
dccps_hc_tx_ccid_private
=
kmalloc
(
sizeof
(
*
hctx
),
gfp_any
());
if
(
dp
->
dccps_hc_tx_ccid_private
==
NULL
)
return
-
ENOMEM
;
...
...
@@ -712,7 +691,6 @@ static void ccid3_hc_tx_exit(struct sock *sk)
struct
dccp_sock
*
dp
=
dccp_sk
(
sk
);
struct
ccid3_hc_tx_sock
*
hctx
=
ccid3_hc_tx_sk
(
sk
);
ccid3_pr_debug
(
"%s, sk=%p
\n
"
,
dccp_role
(
sk
),
sk
);
BUG_ON
(
hctx
==
NULL
);
ccid3_hc_tx_set_state
(
sk
,
TFRC_SSTATE_TERM
);
...
...
@@ -792,10 +770,10 @@ static void ccid3_hc_rx_send_feedback(struct sock *sk)
}
packet
=
dccp_rx_hist_find_data_packet
(
&
hcrx
->
ccid3hcrx_hist
);
if
(
packet
==
NULL
)
{
printk
(
KERN_CRIT
"%s: %s, sk=%p, no data packet in history!
\n
"
,
__FUNCTION__
,
dccp_role
(
sk
),
sk
);
dump_stack
(
);
if
(
unlikely
(
packet
==
NULL
)
)
{
LIMIT_NETDEBUG
(
KERN_WARNING
"%s: %s, sk=%p, no data packet "
"in history!
\n
"
,
__FUNCTION__
,
dccp_role
(
sk
),
sk
);
return
;
}
...
...
@@ -817,11 +795,12 @@ static void ccid3_hc_rx_send_feedback(struct sock *sk)
static
void
ccid3_hc_rx_insert_options
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
)
{
struct
ccid3_hc_rx_sock
*
hcrx
=
ccid3_hc_rx_sk
(
sk
);
const
struct
ccid3_hc_rx_sock
*
hcrx
=
ccid3_hc_rx_sk
(
sk
);
u32
x_recv
,
pinv
;
if
(
hcrx
==
NULL
||
!
(
sk
->
sk_state
==
DCCP_OPEN
||
sk
->
sk_state
==
DCCP_PARTOPEN
))
BUG_ON
(
hcrx
==
NULL
);
if
(
!
(
sk
->
sk_state
==
DCCP_OPEN
||
sk
->
sk_state
==
DCCP_PARTOPEN
))
return
;
DCCP_SKB_CB
(
skb
)
->
dccpd_ccval
=
hcrx
->
ccid3hcrx_last_counter
;
...
...
@@ -878,17 +857,17 @@ static u32 ccid3_hc_rx_calc_first_li(struct sock *sk)
}
}
if
(
step
==
0
)
{
printk
(
KERN_CRIT
"%s: %s, sk=%p, packet history contains no
"
"
data packets!
\n
"
,
__FUNCTION__
,
dccp_role
(
sk
),
sk
);
if
(
unlikely
(
step
==
0
)
)
{
LIMIT_NETDEBUG
(
KERN_WARNING
"%s: %s, sk=%p, packet history
"
"contains no
data packets!
\n
"
,
__FUNCTION__
,
dccp_role
(
sk
),
sk
);
return
~
0
;
}
if
(
interval
==
0
)
{
ccid3_pr_debug
(
"%s, sk=%p, Could not find a win_count
"
"interval > 0. Defaulting to 1
\n
"
,
dccp_role
(
sk
),
sk
);
if
(
unlikely
(
interval
==
0
)
)
{
LIMIT_NETDEBUG
(
KERN_WARNING
"%s: %s, sk=%p, Could not find a
"
"
win_count
interval > 0. Defaulting to 1
\n
"
,
__FUNCTION__
,
dccp_role
(
sk
),
sk
);
interval
=
1
;
}
found:
...
...
@@ -931,8 +910,9 @@ static void ccid3_hc_rx_update_li(struct sock *sk, u64 seq_loss, u8 win_loss)
if
(
li_tail
==
NULL
)
return
;
li_tail
->
dccplih_interval
=
ccid3_hc_rx_calc_first_li
(
sk
);
}
/* FIXME: find end of interval */
}
else
LIMIT_NETDEBUG
(
KERN_WARNING
"%s: FIXME: find end of "
"interval
\n
"
,
__FUNCTION__
);
}
static
void
ccid3_hc_rx_detect_loss
(
struct
sock
*
sk
)
...
...
@@ -956,10 +936,8 @@ static void ccid3_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb)
u32
p_prev
,
r_sample
,
t_elapsed
;
int
ins
;
if
(
hcrx
==
NULL
)
return
;
BUG_ON
(
!
(
hcrx
->
ccid3hcrx_state
==
TFRC_RSTATE_NO_DATA
||
BUG_ON
(
hcrx
==
NULL
||
!
(
hcrx
->
ccid3hcrx_state
==
TFRC_RSTATE_NO_DATA
||
hcrx
->
ccid3hcrx_state
==
TFRC_RSTATE_DATA
));
opt_recv
=
&
dccp_sk
(
sk
)
->
dccps_options_received
;
...
...
@@ -978,8 +956,8 @@ static void ccid3_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb)
t_elapsed
=
opt_recv
->
dccpor_elapsed_time
*
10
;
if
(
unlikely
(
r_sample
<=
t_elapsed
))
LIMIT_NETDEBUG
(
KERN_WARNING
"
%s: r_sample=%uus,
t_elapsed=%uus
\n
"
,
LIMIT_NETDEBUG
(
KERN_WARNING
"%s: r_sample=%uus, "
"t_elapsed=%uus
\n
"
,
__FUNCTION__
,
r_sample
,
t_elapsed
);
else
r_sample
-=
t_elapsed
;
...
...
@@ -997,19 +975,16 @@ static void ccid3_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb)
break
;
case
DCCP_PKT_DATA
:
break
;
default:
ccid3_pr_debug
(
"%s, sk=%p, not DATA/DATAACK/ACK packet(%s)
\n
"
,
dccp_role
(
sk
),
sk
,
dccp_packet_name
(
DCCP_SKB_CB
(
skb
)
->
dccpd_type
));
default:
/* We're not interested in other packet types, move along */
return
;
}
packet
=
dccp_rx_hist_entry_new
(
ccid3_rx_hist
,
sk
,
opt_recv
->
dccpor_ndp
,
skb
,
SLAB_ATOMIC
);
if
(
packet
==
NULL
)
{
ccid3_pr_debug
(
"%s, sk=%p, Not enough mem to add rx packet
"
"to history (consider it lost)!
"
,
dccp_role
(
sk
),
sk
);
if
(
unlikely
(
packet
==
NULL
)
)
{
LIMIT_NETDEBUG
(
KERN_WARNING
"%s: %s, sk=%p, Not enough mem to
"
"add rx packet to history, consider it lost!
\n
"
,
__FUNCTION__
,
dccp_role
(
sk
),
sk
);
return
;
}
...
...
@@ -1102,10 +1077,7 @@ static void ccid3_hc_rx_exit(struct sock *sk)
struct
ccid3_hc_rx_sock
*
hcrx
=
ccid3_hc_rx_sk
(
sk
);
struct
dccp_sock
*
dp
=
dccp_sk
(
sk
);
ccid3_pr_debug
(
"%s, sk=%p
\n
"
,
dccp_role
(
sk
),
sk
);
if
(
hcrx
==
NULL
)
return
;
BUG_ON
(
hcrx
==
NULL
);
ccid3_hc_rx_set_state
(
sk
,
TFRC_RSTATE_TERM
);
...
...
@@ -1123,8 +1095,7 @@ static void ccid3_hc_rx_get_info(struct sock *sk, struct tcp_info *info)
{
const
struct
ccid3_hc_rx_sock
*
hcrx
=
ccid3_hc_rx_sk
(
sk
);
if
(
hcrx
==
NULL
)
return
;
BUG_ON
(
hcrx
==
NULL
);
info
->
tcpi_ca_state
=
hcrx
->
ccid3hcrx_state
;
info
->
tcpi_options
|=
TCPI_OPT_TIMESTAMPS
;
...
...
@@ -1135,8 +1106,7 @@ static void ccid3_hc_tx_get_info(struct sock *sk, struct tcp_info *info)
{
const
struct
ccid3_hc_tx_sock
*
hctx
=
ccid3_hc_tx_sk
(
sk
);
if
(
hctx
==
NULL
)
return
;
BUG_ON
(
hctx
==
NULL
);
info
->
tcpi_rto
=
hctx
->
ccid3hctx_t_rto
;
info
->
tcpi_rtt
=
hctx
->
ccid3hctx_rtt
;
...
...
net/dccp/ccids/ccid3.h
浏览文件 @
2a044515
...
...
@@ -48,6 +48,8 @@
/* Two seconds as per CCID3 spec */
#define TFRC_INITIAL_TIMEOUT (2 * USEC_PER_SEC)
#define TFRC_INITIAL_IPI (USEC_PER_SEC / 4)
/* In usecs - half the scheduling granularity as per RFC3448 4.6 */
#define TFRC_OPSYS_HALF_TIME_GRAN (USEC_PER_SEC / (2 * HZ))
...
...
net/dccp/ipv4.c
浏览文件 @
2a044515
...
...
@@ -641,16 +641,12 @@ int dccp_v4_send_reset(struct sock *sk, enum dccp_reset_codes code)
skb
=
dccp_make_reset
(
sk
,
sk
->
sk_dst_cache
,
code
);
if
(
skb
!=
NULL
)
{
const
struct
dccp_sock
*
dp
=
dccp_sk
(
sk
);
const
struct
inet_sock
*
inet
=
inet_sk
(
sk
);
err
=
ip_build_and_send_pkt
(
skb
,
sk
,
inet
->
saddr
,
inet
->
daddr
,
NULL
);
if
(
err
==
NET_XMIT_CN
)
err
=
0
;
ccid_hc_rx_exit
(
dp
->
dccps_hc_rx_ccid
,
sk
);
ccid_hc_tx_exit
(
dp
->
dccps_hc_tx_ccid
,
sk
);
}
return
err
;
...
...
net/dccp/output.c
浏览文件 @
2a044515
...
...
@@ -522,7 +522,4 @@ void dccp_send_close(struct sock *sk, const int active)
dccp_transmit_skb
(
sk
,
skb_clone
(
skb
,
prio
));
}
else
dccp_transmit_skb
(
sk
,
skb
);
ccid_hc_rx_exit
(
dp
->
dccps_hc_rx_ccid
,
sk
);
ccid_hc_tx_exit
(
dp
->
dccps_hc_tx_ccid
,
sk
);
}
net/ipv6/exthdrs.c
浏览文件 @
2a044515
...
...
@@ -406,8 +406,7 @@ ipv6_invert_rthdr(struct sock *sk, struct ipv6_rt_hdr *hdr)
memcpy
(
opt
->
srcrt
,
hdr
,
sizeof
(
*
hdr
));
irthdr
=
(
struct
rt0_hdr
*
)
opt
->
srcrt
;
/* Obsolete field, MBZ, when originated by us */
irthdr
->
bitmap
=
0
;
irthdr
->
reserved
=
0
;
opt
->
srcrt
->
segments_left
=
n
;
for
(
i
=
0
;
i
<
n
;
i
++
)
memcpy
(
irthdr
->
addr
+
i
,
rthdr
->
addr
+
(
n
-
1
-
i
),
16
);
...
...
net/ipv6/netfilter/ip6t_rt.c
浏览文件 @
2a044515
...
...
@@ -161,8 +161,8 @@ match(const struct sk_buff *skb,
((
rtinfo
->
hdrlen
==
hdrlen
)
^
!!
(
rtinfo
->
invflags
&
IP6T_RT_INV_LEN
))));
DEBUGP
(
"res %02X %02X %02X "
,
(
rtinfo
->
flags
&
IP6T_RT_RES
),
((
struct
rt0_hdr
*
)
rh
)
->
bitmap
,
!
((
rtinfo
->
flags
&
IP6T_RT_RES
)
&&
(((
struct
rt0_hdr
*
)
rh
)
->
bitmap
)));
(
rtinfo
->
flags
&
IP6T_RT_RES
),
((
struct
rt0_hdr
*
)
rh
)
->
reserved
,
!
((
rtinfo
->
flags
&
IP6T_RT_RES
)
&&
(((
struct
rt0_hdr
*
)
rh
)
->
reserved
)));
ret
=
(
rh
!=
NULL
)
&&
...
...
@@ -179,12 +179,12 @@ match(const struct sk_buff *skb,
!!
(
rtinfo
->
invflags
&
IP6T_RT_INV_TYP
)));
if
(
ret
&&
(
rtinfo
->
flags
&
IP6T_RT_RES
))
{
u_int32_t
*
bp
,
_bitmap
;
b
p
=
skb_header_pointer
(
skb
,
ptr
+
offsetof
(
struct
rt0_hdr
,
bitmap
),
sizeof
(
_
bitmap
),
&
_bitmap
);
u_int32_t
*
rp
,
_reserved
;
r
p
=
skb_header_pointer
(
skb
,
ptr
+
offsetof
(
struct
rt0_hdr
,
reserved
),
sizeof
(
_
reserved
),
&
_reserved
);
ret
=
(
*
b
p
==
0
);
ret
=
(
*
r
p
==
0
);
}
DEBUGP
(
"#%d "
,
rtinfo
->
addrnr
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录