X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=datapath%2Fsnap.h;h=0d39a62209d993dc35cdfc44bc6667074c9e1e54;hb=3a5cc3f9e7d04eb1a5061e7bdc86ef01fd045ce7;hp=02ff18f2b861e37750c273c9fec04aa49591da34;hpb=005486c77370632b37f659293d1f8efa72d1526a;p=sliver-openvswitch.git diff --git a/datapath/snap.h b/datapath/snap.h index 02ff18f2b..0d39a6220 100644 --- a/datapath/snap.h +++ b/datapath/snap.h @@ -19,9 +19,9 @@ 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) - || (!memcmp(sh->oui, "\0\0\0", SNAP_OUI_LEN))) + if ((sh->dsap != LLC_SAP_SNAP) + || (sh->ssap != LLC_SAP_SNAP) + || (memcmp(sh->oui, "\0\0\0", SNAP_OUI_LEN))) return -EINVAL; *ethertype = sh->ethertype;