lib: use bitwise AND when checking for ARP
Need to use a bitwise rather than boolean AND operator when checking for ARP. (Change && to &)
This commit is contained in:
1 parent
68ad5e836f
commit
9c6ec98d76
1 file changed
+1
-1
+1
-1
@@ -216,7 +216,7 @@ flow_extract(struct ofpbuf *packet, uint16_t in_port, struct flow *flow)
|
||||
flow->nw_src = arp->ar_spa;
|
||||
flow->nw_dst = arp->ar_tpa;
|
||||
}
|
||||
flow->nw_proto = ntohs(arp->ar_op) && 0xff;
|
||||
flow->nw_proto = ntohs(arp->ar_op) & 0xff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user