Fix problem with identifying SNAP frames when extracting flows.
authorJustin Pettit <jpettit@nicira.com>
Wed, 14 May 2008 22:50:30 +0000 (15:50 -0700)
committerJustin Pettit <jpettit@nicira.com>
Wed, 14 May 2008 22:50:30 +0000 (15:50 -0700)
The ssap field was being checked twice to see if it was SNAP, when one of the checks should have been dsap.

datapath/snap.h

index 02ff18f2b861e37750c273c9fec04aa49591da34..446b5f22dba25caffab578fbbdfbc8a34d19803e 100644 (file)
@@ -20,7 +20,7 @@ static inline int snap_get_ethertype(struct sk_buff *skb, uint16_t *ethertype)
        struct snap_hdr *sh = (struct snap_hdr *)(skb->data 
                                + sizeof(struct ethhdr));
        if (((sh->dsap & 0xFE) != LLC_SAP_SNAP) 
-                               || ((sh->dsap & 0xFE) != LLC_SAP_SNAP)
+                               || ((sh->ssap & 0xFE) != LLC_SAP_SNAP)
                                || (!memcmp(sh->oui, "\0\0\0", SNAP_OUI_LEN)))
                return -EINVAL;