Skip to content

Commit

Permalink
net/x25: handle call collisions
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
sch-m authored and davem330 committed Nov 29, 2018
1 parent 0613761 commit b020fcf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions net/x25/x25_in.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,15 @@ static int x25_state1_machine(struct sock *sk, struct sk_buff *skb, int frametyp
sk->sk_state_change(sk);
break;
}
case X25_CALL_REQUEST:
/* call collision */
x25->causediag.cause = 0x01;
x25->causediag.diagnostic = 0x48;

x25_write_internal(sk, X25_CLEAR_REQUEST);
x25_disconnect(sk, EISCONN, 0x01, 0x48);
break;

case X25_CLEAR_REQUEST:
if (!pskb_may_pull(skb, X25_STD_MIN_LEN + 2))
goto out_clear;
Expand Down

0 comments on commit b020fcf

Please sign in to comment.