X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fmatch.c;h=1154b204c2452a7594ebebc97d74d4a2de112d49;hb=61bf6666bec930dbfbf26c832199af93d0c5d6d1;hp=71d86beaefdcde3e3f51eec11523add0038a5ff8;hpb=4cf5406ba2e8bb8271940b2f54967c9fd1270212;p=sliver-openvswitch.git diff --git a/lib/match.c b/lib/match.c index 71d86beae..1154b204c 100644 --- a/lib/match.c +++ b/lib/match.c @@ -1069,11 +1069,12 @@ match_format(const struct match *match, struct ds *s, unsigned int priority) format_be16_masked(s, "tp_dst", f->tp_dst, wc->masks.tp_dst); } if (is_ip_any(f) && f->nw_proto == IPPROTO_TCP && wc->masks.tcp_flags) { - if (wc->masks.tcp_flags == htons(UINT16_MAX)) { + uint16_t mask = TCP_FLAGS(wc->masks.tcp_flags); + if (mask == TCP_FLAGS(OVS_BE16_MAX)) { ds_put_format(s, "tcp_flags=0x%03"PRIx16",", ntohs(f->tcp_flags)); } else { - ds_put_format(s, "tcp_flags=0x%03"PRIx16"/0x%03"PRIx16",", - ntohs(f->tcp_flags), ntohs(wc->masks.tcp_flags)); + format_flags_masked(s, "tcp_flags", packet_tcp_flag_to_string, + ntohs(f->tcp_flags), mask); } }