From: Justin Pettit Date: Wed, 14 May 2008 22:50:30 +0000 (-0700) Subject: Fix problem with identifying SNAP frames when extracting flows. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a1d4f038dcc1d595e3603b01ddd106ee406b41e;p=openvswitch Fix problem with identifying SNAP frames when extracting flows. The ssap field was being checked twice to see if it was SNAP, when one of the checks should have been dsap. --- diff --git a/datapath/snap.h b/datapath/snap.h index 02ff18f2..446b5f22 100644 --- a/datapath/snap.h +++ b/datapath/snap.h @@ -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;