X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fclassifier.c;h=ba10272f77a0b632a8031efd2a1e91b0d7fcc99b;hb=406e37ecf554529e9380ef06863d85ccc94009d1;hp=86d8269021342c071fb766e3e21133b05666d9ea;hpb=b9298d3f825703063c9538aa37407da43e1e4781;p=openvswitch diff --git a/lib/classifier.c b/lib/classifier.c index 86d82690..ba10272f 100644 --- a/lib/classifier.c +++ b/lib/classifier.c @@ -352,7 +352,7 @@ cls_rule_format(const struct cls_rule *rule, struct ds *s) int i; - if (rule->priority != 32768) { + if (rule->priority != OFP_DEFAULT_PRIORITY) { ds_put_format(s, "priority=%d,", rule->priority); } @@ -447,9 +447,9 @@ cls_rule_format(const struct cls_rule *rule, struct ds *s) format_ip_netmask(s, "nw_dst", f->nw_dst, wc->nw_dst_mask); if (!skip_proto && !(w & FWW_NW_PROTO)) { if (f->dl_type == htons(ETH_TYPE_ARP)) { - ds_put_format(s, "arp_op=%"PRIu8, f->nw_proto); + ds_put_format(s, "opcode=%"PRIu8",", f->nw_proto); } else { - ds_put_format(s, "nw_proto=%"PRIu8, f->nw_proto); + ds_put_format(s, "nw_proto=%"PRIu8",", f->nw_proto); } } if (!(w & FWW_NW_TOS)) { @@ -457,17 +457,17 @@ cls_rule_format(const struct cls_rule *rule, struct ds *s) } if (f->nw_proto == IP_TYPE_ICMP) { if (!(w & FWW_TP_SRC)) { - ds_put_format(s, "icmp_type=%"PRIu16, ntohs(f->tp_src)); + ds_put_format(s, "icmp_type=%"PRIu16",", ntohs(f->tp_src)); } if (!(w & FWW_TP_DST)) { - ds_put_format(s, "icmp_code=%"PRIu16, ntohs(f->tp_dst)); + ds_put_format(s, "icmp_code=%"PRIu16",", ntohs(f->tp_dst)); } } else { if (!(w & FWW_TP_SRC)) { - ds_put_format(s, "tp_src=%"PRIu16, ntohs(f->tp_src)); + ds_put_format(s, "tp_src=%"PRIu16",", ntohs(f->tp_src)); } if (!(w & FWW_TP_DST)) { - ds_put_format(s, "tp_dst=%"PRIu16, ntohs(f->tp_dst)); + ds_put_format(s, "tp_dst=%"PRIu16",", ntohs(f->tp_dst)); } }