diff options
author | H. Peter Anvin <hpa@zytor.com> | 2010-05-08 23:59:58 +0200 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2010-05-08 23:59:58 +0200 |
commit | d7be0ce6afb1df60bc786f57410407ceae92b994 (patch) | |
tree | 5e91acfc12c833531ad3320f274e0cd96a129973 /net/x25/x25_in.c | |
parent | x86: Clean up the hypervisor layer (diff) | |
parent | Linux 2.6.34-rc6 (diff) | |
download | linux-d7be0ce6afb1df60bc786f57410407ceae92b994.tar.xz linux-d7be0ce6afb1df60bc786f57410407ceae92b994.zip |
Merge commit 'v2.6.34-rc6' into x86/cpu
Diffstat (limited to 'net/x25/x25_in.c')
-rw-r--r-- | net/x25/x25_in.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/net/x25/x25_in.c b/net/x25/x25_in.c index 96d922783547..372ac226e648 100644 --- a/net/x25/x25_in.c +++ b/net/x25/x25_in.c @@ -23,6 +23,7 @@ * i-frames. */ +#include <linux/slab.h> #include <linux/errno.h> #include <linux/kernel.h> #include <linux/string.h> @@ -89,6 +90,7 @@ static int x25_queue_rx_frame(struct sock *sk, struct sk_buff *skb, int more) static int x25_state1_machine(struct sock *sk, struct sk_buff *skb, int frametype) { struct x25_address source_addr, dest_addr; + int len; switch (frametype) { case X25_CALL_ACCEPTED: { @@ -106,11 +108,17 @@ static int x25_state1_machine(struct sock *sk, struct sk_buff *skb, int frametyp * Parse the data in the frame. */ skb_pull(skb, X25_STD_MIN_LEN); - skb_pull(skb, x25_addr_ntoa(skb->data, &source_addr, &dest_addr)); - skb_pull(skb, - x25_parse_facilities(skb, &x25->facilities, + + len = x25_parse_address_block(skb, &source_addr, + &dest_addr); + if (len > 0) + skb_pull(skb, len); + + len = x25_parse_facilities(skb, &x25->facilities, &x25->dte_facilities, - &x25->vc_facil_mask)); + &x25->vc_facil_mask); + if (len > 0) + skb_pull(skb, len); /* * Copy any Call User Data. */ |