diff options
author | Martin Schiller <ms@dev.tdt.de> | 2018-11-27 03:50:29 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-29 17:25:36 -0500 |
commit | b020fcf6bb4b2d980298c416b3f407075aa2b3b6 (patch) | |
tree | 0416911e00e9f98aafd8ca8df328c2cacdaa35b8 /net | |
parent | 06137619f061f498c2924f6543fa45b7d39f0501 (diff) |
net/x25: handle call collisions
If a session in X25_STATE_1 (Awaiting Call Accept) receives a call
request, the session will be closed (x25_disconnect), cause=0x01
(Number Busy) and diag=0x48 (Call Collision) will be set and a clear
request will be send.
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/x25/x25_in.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/x25/x25_in.c b/net/x25/x25_in.c index 3c12cae32001..afb26221d8a8 100644 --- a/net/x25/x25_in.c +++ b/net/x25/x25_in.c | |||
@@ -142,6 +142,15 @@ static int x25_state1_machine(struct sock *sk, struct sk_buff *skb, int frametyp | |||
142 | sk->sk_state_change(sk); | 142 | sk->sk_state_change(sk); |
143 | break; | 143 | break; |
144 | } | 144 | } |
145 | case X25_CALL_REQUEST: | ||
146 | /* call collision */ | ||
147 | x25->causediag.cause = 0x01; | ||
148 | x25->causediag.diagnostic = 0x48; | ||
149 | |||
150 | x25_write_internal(sk, X25_CLEAR_REQUEST); | ||
151 | x25_disconnect(sk, EISCONN, 0x01, 0x48); | ||
152 | break; | ||
153 | |||
145 | case X25_CLEAR_REQUEST: | 154 | case X25_CLEAR_REQUEST: |
146 | if (!pskb_may_pull(skb, X25_STD_MIN_LEN + 2)) | 155 | if (!pskb_may_pull(skb, X25_STD_MIN_LEN + 2)) |
147 | goto out_clear; | 156 | goto out_clear; |