Thread (8 messages) 8 messages, 4 authors, 2008-01-30

Re: [PATCH net-2.6.25 4/7][ATM]: [br2864] routed support

From: chas williams - CONTRACTOR <hidden>
Date: 2008-01-26 12:20:38
Subsystem: atm, networking [general], the rest · Maintainers: Chas Williams, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

In message [ref],"Chung-
Chi Lo" writes:
Question to decode the encaps=VCMUX and bridge mode:

This line
skb_pull((skb, BR2684_PAD_LEN + ETH_HLEN);
should be replaced by
skb_pull((skb, BR2684_PAD_LEN);
you are correct.
By the way, this routed mode patch doesn't include encaps=VCMUX and
RFC2684 routed
protocol decapsulation?
yep.  eric believes the following should fix both problems:

commit 43e4b025ffe130cd6a292fa9ff909e39a88f849c
Author: Chas Williams - CONTRACTOR [off-list ref]
Date:   Sat Jan 26 07:18:26 2008 -0500

    [ATM]: [br2864] fix vcmux support
    
    From: Eric Kinzie [off-list ref]
    Signed-off-by: Chas Williams [off-list ref]
diff --git a/net/atm/br2684.c b/net/atm/br2684.c
index 31347cb..97b422c 100644
--- a/net/atm/br2684.c
+++ b/net/atm/br2684.c
@@ -400,15 +400,20 @@ static void br2684_push(struct atm_vcc *atmvcc, struct sk_buff *skb)
 			return;
 		}
 
-	} else {
-		/* first 2 chars should be 0 */
-		if (*((u16 *) (skb->data)) != 0) {
-			brdev->stats.rx_errors++;
-			dev_kfree_skb(skb);
-			return;
+	} else { /* vc-mux */
+		if (brdev->payload == p_routed) {
+			skb_reset_network_header(skb);
+			skb->pkt_type = PACKET_HOST;
+		} else { /* p_bridged */
+			/* first 2 chars should be 0 */
+			if (*((u16 *) (skb->data)) != 0) {
+				brdev->stats.rx_errors++;
+				dev_kfree_skb(skb);
+				return;
+			}
+			skb_pull(skb, BR2684_PAD_LEN);
+			skb->protocol = eth_type_trans(skb, net_dev);
 		}
-		skb_pull(skb, BR2684_PAD_LEN + ETH_HLEN);	/* pad, dstmac, srcmac, ethtype */
-		skb->protocol = eth_type_trans(skb, net_dev);
 	}
 
 #ifdef CONFIG_ATM_BR2684_IPFILTER
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help