Commit d9b52dc6 authored by Yoichi Yuasa's avatar Yoichi Yuasa Committed by David S. Miller

net/dccp: expansion of error code size

Because MIPS's EDQUOT value is 1133(0x46d).
It's larger than u8.
Signed-off-by: default avatarYoichi Yuasa <yuasa@linux-mips.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5eb32bd0
...@@ -124,9 +124,9 @@ static int dccp_rcv_closereq(struct sock *sk, struct sk_buff *skb) ...@@ -124,9 +124,9 @@ static int dccp_rcv_closereq(struct sock *sk, struct sk_buff *skb)
return queued; return queued;
} }
static u8 dccp_reset_code_convert(const u8 code) static u16 dccp_reset_code_convert(const u8 code)
{ {
const u8 error_code[] = { const u16 error_code[] = {
[DCCP_RESET_CODE_CLOSED] = 0, /* normal termination */ [DCCP_RESET_CODE_CLOSED] = 0, /* normal termination */
[DCCP_RESET_CODE_UNSPECIFIED] = 0, /* nothing known */ [DCCP_RESET_CODE_UNSPECIFIED] = 0, /* nothing known */
[DCCP_RESET_CODE_ABORTED] = ECONNRESET, [DCCP_RESET_CODE_ABORTED] = ECONNRESET,
...@@ -148,7 +148,7 @@ static u8 dccp_reset_code_convert(const u8 code) ...@@ -148,7 +148,7 @@ static u8 dccp_reset_code_convert(const u8 code)
static void dccp_rcv_reset(struct sock *sk, struct sk_buff *skb) static void dccp_rcv_reset(struct sock *sk, struct sk_buff *skb)
{ {
u8 err = dccp_reset_code_convert(dccp_hdr_reset(skb)->dccph_reset_code); u16 err = dccp_reset_code_convert(dccp_hdr_reset(skb)->dccph_reset_code);
sk->sk_err = err; sk->sk_err = err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment