aboutsummaryrefslogtreecommitdiffstats
path: root/net/x25
diff options
context:
space:
mode:
Diffstat (limited to 'net/x25')
-rw-r--r--net/x25/af_x25.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c
index 3d97b8caf0b1..e5c1e3298f8a 100644
--- a/net/x25/af_x25.c
+++ b/net/x25/af_x25.c
@@ -586,7 +586,7 @@ static int x25_create(struct net *net, struct socket *sock, int protocol,
586 x25->t2 = sysctl_x25_ack_holdback_timeout; 586 x25->t2 = sysctl_x25_ack_holdback_timeout;
587 x25->state = X25_STATE_0; 587 x25->state = X25_STATE_0;
588 x25->cudmatchlength = 0; 588 x25->cudmatchlength = 0;
589 x25->accptapprv = X25_DENY_ACCPT_APPRV; /* normally no cud */ 589 set_bit(X25_ACCPT_APPRV_FLAG, &x25->flags); /* normally no cud */
590 /* on call accept */ 590 /* on call accept */
591 591
592 x25->facilities.winsize_in = X25_DEFAULT_WINDOW_SIZE; 592 x25->facilities.winsize_in = X25_DEFAULT_WINDOW_SIZE;
@@ -639,7 +639,6 @@ static struct sock *x25_make_new(struct sock *osk)
639 x25->facilities = ox25->facilities; 639 x25->facilities = ox25->facilities;
640 x25->dte_facilities = ox25->dte_facilities; 640 x25->dte_facilities = ox25->dte_facilities;
641 x25->cudmatchlength = ox25->cudmatchlength; 641 x25->cudmatchlength = ox25->cudmatchlength;
642 x25->accptapprv = ox25->accptapprv;
643 642
644 clear_bit(X25_INTERRUPT_FLAG, &x25->flags); 643 clear_bit(X25_INTERRUPT_FLAG, &x25->flags);
645 x25_init_timers(sk); 644 x25_init_timers(sk);
@@ -1057,8 +1056,8 @@ int x25_rx_call_request(struct sk_buff *skb, struct x25_neigh *nb,
1057 makex25->vc_facil_mask &= ~X25_MASK_CALLING_AE; 1056 makex25->vc_facil_mask &= ~X25_MASK_CALLING_AE;
1058 makex25->cudmatchlength = x25_sk(sk)->cudmatchlength; 1057 makex25->cudmatchlength = x25_sk(sk)->cudmatchlength;
1059 1058
1060 /* Normally all calls are accepted immediatly */ 1059 /* Normally all calls are accepted immediately */
1061 if(makex25->accptapprv & X25_DENY_ACCPT_APPRV) { 1060 if (test_bit(X25_ACCPT_APPRV_FLAG, &makex25->flags)) {
1062 x25_write_internal(make, X25_CALL_ACCEPTED); 1061 x25_write_internal(make, X25_CALL_ACCEPTED);
1063 makex25->state = X25_STATE_3; 1062 makex25->state = X25_STATE_3;
1064 } 1063 }
@@ -1580,7 +1579,7 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1580 rc = -EINVAL; 1579 rc = -EINVAL;
1581 if (sk->sk_state != TCP_CLOSE) 1580 if (sk->sk_state != TCP_CLOSE)
1582 break; 1581 break;
1583 x25->accptapprv = X25_ALLOW_ACCPT_APPRV; 1582 clear_bit(X25_ACCPT_APPRV_FLAG, &x25->flags);
1584 rc = 0; 1583 rc = 0;
1585 break; 1584 break;
1586 } 1585 }
@@ -1589,7 +1588,8 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1589 rc = -EINVAL; 1588 rc = -EINVAL;
1590 if (sk->sk_state != TCP_ESTABLISHED) 1589 if (sk->sk_state != TCP_ESTABLISHED)
1591 break; 1590 break;
1592 if (x25->accptapprv) /* must call accptapprv above */ 1591 /* must call accptapprv above */
1592 if (test_bit(X25_ACCPT_APPRV_FLAG, &x25->flags))
1593 break; 1593 break;
1594 x25_write_internal(sk, X25_CALL_ACCEPTED); 1594 x25_write_internal(sk, X25_CALL_ACCEPTED);
1595 x25->state = X25_STATE_3; 1595 x25->state = X25_STATE_3;