In message <[EMAIL PROTECTED]>,"Chung-
Chi Lo" writes:
>> +       } else { /* vc-mux */
>> +               if (brdev->payload == p_routed) {
>
>add line
>
>                       skb->protocol = __constant_htons(ETH_P_IP);
>
>here just like LLC did?
>
>> +                       skb_reset_network_header(skb);
>> +                       skb->pkt_type = PACKET_HOST;

yes, that is missing but it needs to be a little more complicated than
that i think.  you need to examine the first byte to see if its an
ipv4 or ipv6 datagram.  something like:

                        struct iphdr *iph = skb_network_header(skb);

                        skb_reset_network_header(skb);
                        iph = skb_network_header(skb);
                        if (iph->version == 4)
                                skb->protocol = __constant_htons(ETH_P_IP);
                        else if (iph->version == 6)
                                skb->protocol = __constant_htons(ETH_P_IPV6);
                        else
                                /* drop the packet */
                        skb->pkt_type = PACKET_HOST;

how does that look?

>+       } else {
>+               skb_push(skb, 2);
>+               if (brdev->payload == p_bridged)
>+                       memset(skb->data, 0, 2);
>+       }
>
>Here should be
>
>       } else {
>               if (brdev->payload == p_bridged) {
>                       skb_push(skb, 2);
>                       memset(skb->data, 0, 2);
>               }
>       }
>
>Because VCMUX and routed mode doesn't need two bytes in header.

yeah, another oversight.  your fix is correct. i bet you have guessed
that we dont use vc multiplexing.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to