aboutsummaryrefslogtreecommitdiffstats
path: root/net/llc/llc_s_ac.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/llc/llc_s_ac.c')
-rw-r--r--net/llc/llc_s_ac.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/llc/llc_s_ac.c b/net/llc/llc_s_ac.c
index ac3d93b210d2..a94bd56bcac6 100644
--- a/net/llc/llc_s_ac.c
+++ b/net/llc/llc_s_ac.c
@@ -103,7 +103,8 @@ int llc_sap_action_send_xid_r(struct llc_sap *sap, struct sk_buff *skb)
103 llc_pdu_decode_sa(skb, mac_da); 103 llc_pdu_decode_sa(skb, mac_da);
104 llc_pdu_decode_da(skb, mac_sa); 104 llc_pdu_decode_da(skb, mac_sa);
105 llc_pdu_decode_ssap(skb, &dsap); 105 llc_pdu_decode_ssap(skb, &dsap);
106 nskb = llc_alloc_frame(NULL, skb->dev); 106 nskb = llc_alloc_frame(NULL, skb->dev, LLC_PDU_TYPE_U,
107 sizeof(struct llc_xid_info));
107 if (!nskb) 108 if (!nskb)
108 goto out; 109 goto out;
109 llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, sap->laddr.lsap, dsap, 110 llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, sap->laddr.lsap, dsap,
@@ -144,11 +145,15 @@ int llc_sap_action_send_test_r(struct llc_sap *sap, struct sk_buff *skb)
144 u8 mac_da[ETH_ALEN], mac_sa[ETH_ALEN], dsap; 145 u8 mac_da[ETH_ALEN], mac_sa[ETH_ALEN], dsap;
145 struct sk_buff *nskb; 146 struct sk_buff *nskb;
146 int rc = 1; 147 int rc = 1;
148 u32 data_size;
147 149
148 llc_pdu_decode_sa(skb, mac_da); 150 llc_pdu_decode_sa(skb, mac_da);
149 llc_pdu_decode_da(skb, mac_sa); 151 llc_pdu_decode_da(skb, mac_sa);
150 llc_pdu_decode_ssap(skb, &dsap); 152 llc_pdu_decode_ssap(skb, &dsap);
151 nskb = llc_alloc_frame(NULL, skb->dev); 153
154 /* The test request command is type U (llc_len = 3) */
155 data_size = ntohs(eth_hdr(skb)->h_proto) - 3;
156 nskb = llc_alloc_frame(NULL, skb->dev, LLC_PDU_TYPE_U, data_size);
152 if (!nskb) 157 if (!nskb)
153 goto out; 158 goto out;
154 llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, sap->laddr.lsap, dsap, 159 llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, sap->laddr.lsap, dsap,