Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 171766
b: refs/heads/master
c: 386e50c
h: refs/heads/master
v: v3
  • Loading branch information
Andrew Hendry authored and David S. Miller committed Nov 19, 2009
1 parent 30fb859 commit 869e65e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0e4817470be8d233fb58b5af7b938185dae94d67
refs/heads/master: 386e50cc7d82b3799ea6f53267f04f123ae05afe
1 change: 1 addition & 0 deletions trunk/include/linux/x25.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#define SIOCX25SENDCALLACCPT (SIOCPROTOPRIVATE + 9)
#define SIOCX25GDTEFACILITIES (SIOCPROTOPRIVATE + 10)
#define SIOCX25SDTEFACILITIES (SIOCPROTOPRIVATE + 11)
#define SIOCX25SCAUSEDIAG (SIOCPROTOPRIVATE + 12)

/*
* Values for {get,set}sockopt.
Expand Down
12 changes: 12 additions & 0 deletions trunk/net/x25/af_x25.c
Original file line number Diff line number Diff line change
Expand Up @@ -1471,6 +1471,17 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
break;
}

case SIOCX25SCAUSEDIAG: {
struct x25_causediag causediag;
rc = -EFAULT;
if (copy_from_user(&causediag, argp, sizeof(causediag)))
break;
x25->causediag = causediag;
rc = 0;
break;

}

case SIOCX25SCUDMATCHLEN: {
struct x25_subaddr sub_addr;
rc = -EINVAL;
Expand Down Expand Up @@ -1639,6 +1650,7 @@ static int compat_x25_ioctl(struct socket *sock, unsigned int cmd,
case SIOCX25GCALLUSERDATA:
case SIOCX25SCALLUSERDATA:
case SIOCX25GCAUSEDIAG:
case SIOCX25SCAUSEDIAG:
case SIOCX25SCUDMATCHLEN:
case SIOCX25CALLACCPTAPPRV:
case SIOCX25SENDCALLACCPT:
Expand Down
6 changes: 6 additions & 0 deletions trunk/net/x25/x25_subr.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,12 @@ void x25_write_internal(struct sock *sk, int frametype)
break;

case X25_CLEAR_REQUEST:
dptr = skb_put(skb, 3);
*dptr++ = frametype;
*dptr++ = x25->causediag.cause;
*dptr++ = x25->causediag.diagnostic;
break;

case X25_RESET_REQUEST:
dptr = skb_put(skb, 3);
*dptr++ = frametype;
Expand Down

0 comments on commit 869e65e

Please sign in to comment.