Skip to content

Commit b020fcf

Browse files
sch-mdavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 0613761 commit b020fcf

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

net/x25/x25_in.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,15 @@ static int x25_state1_machine(struct sock *sk, struct sk_buff *skb, int frametyp
142142
sk->sk_state_change(sk);
143143
break;
144144
}
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+
145154
case X25_CLEAR_REQUEST:
146155
if (!pskb_may_pull(skb, X25_STD_MIN_LEN + 2))
147156
goto out_clear;

0 commit comments

Comments
 (0)