summaryrefslogtreecommitdiffstats
path: root/net/lapb
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-11-28 03:58:46 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-11-28 03:58:46 +0000
commitb63ad0882a16a5d28003e57f2b0b81dee3fb322b (patch)
tree0a343ce219e2b8b38a5d702d66032c57b83d9720 /net/lapb
parenta9d7bff9a84dba79609a0002e5321b74c4d64c64 (diff)
Merge with 2.4.0-test11.
Diffstat (limited to 'net/lapb')
-rw-r--r--net/lapb/lapb_iface.c10
-rw-r--r--net/lapb/lapb_in.c16
2 files changed, 19 insertions, 7 deletions
diff --git a/net/lapb/lapb_iface.c b/net/lapb/lapb_iface.c
index bdc84d72f..1723588da 100644
--- a/net/lapb/lapb_iface.c
+++ b/net/lapb/lapb_iface.c
@@ -12,6 +12,7 @@
* History
* LAPB 001 Jonathan Naylor Started Coding
* LAPB 002 Jonathan Naylor New timer architecture.
+ * 2000-10-29 Henner Eisen lapb_data_indication() return status.
*/
#include <linux/config.h>
@@ -370,14 +371,11 @@ void lapb_disconnect_indication(lapb_cb *lapb, int reason)
int lapb_data_indication(lapb_cb *lapb, struct sk_buff *skb)
{
- int used = 0;
-
if (lapb->callbacks.data_indication != NULL) {
- (lapb->callbacks.data_indication)(lapb->token, skb);
- used = 1;
+ return (lapb->callbacks.data_indication)(lapb->token, skb);
}
-
- return used;
+ kfree_skb(skb);
+ return NET_RX_CN_HIGH; /* For now; must be != NET_RX_DROP */
}
int lapb_data_transmit(lapb_cb *lapb, struct sk_buff *skb)
diff --git a/net/lapb/lapb_in.c b/net/lapb/lapb_in.c
index 4e7a9ca4d..0b45f57f5 100644
--- a/net/lapb/lapb_in.c
+++ b/net/lapb/lapb_in.c
@@ -12,6 +12,7 @@
* History
* LAPB 001 Jonathan Naulor Started Coding
* LAPB 002 Jonathan Naylor New timer architecture.
+ * 2000-10-29 Henner Eisen lapb_data_indication() return status.
*/
#include <linux/config.h>
@@ -464,8 +465,21 @@ static void lapb_state3_machine(lapb_cb *lapb, struct sk_buff *skb, struct lapb_
lapb_check_iframes_acked(lapb, frame->nr);
}
if (frame->ns == lapb->vr) {
+ int cn;
+ cn = lapb_data_indication(lapb, skb);
+ queued = 1;
+ /*
+ * If upper layer has dropped the frame, we
+ * basically ignore any further protocol
+ * processing. This will cause the peer
+ * to re-transmit the frame later like
+ * a frame lost on the wire.
+ */
+ if(cn == NET_RX_DROP){
+ printk(KERN_DEBUG "LAPB: rx congestion\n");
+ break;
+ }
lapb->vr = (lapb->vr + 1) % modulus;
- queued = lapb_data_indication(lapb, skb);
lapb->condition &= ~LAPB_REJECT_CONDITION;
if (frame->pf) {
lapb_enquiry_response(lapb);