X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ofproto%2Fnetflow.c;h=f0af436d176b2d7e4868bd0330cd3ce6c64ce2cc;hb=ecac4ebf93feed5e95a517b48915e40d92052386;hp=c237ef25f4f63ac79b3648cf290b0898368ec86d;hpb=2c360fbb2777fba6d35599e4b53287e2ecb26fa9;p=openvswitch diff --git a/ofproto/netflow.c b/ofproto/netflow.c index c237ef25..f0af436d 100644 --- a/ofproto/netflow.c +++ b/ofproto/netflow.c @@ -104,7 +104,7 @@ struct netflow { static void gen_netflow_rec(struct netflow *nf, struct netflow_flow *nf_flow, - struct ofexpired *expired, + struct ofexpired *expired, uint32_t packet_count, uint32_t byte_count) { struct netflow_v5_header *nf_hdr; @@ -133,7 +133,7 @@ gen_netflow_rec(struct netflow *nf, struct netflow_flow *nf_flow, nf_rec = ofpbuf_put_zeros(&nf->packet, sizeof *nf_rec); nf_rec->src_addr = expired->flow.nw_src; nf_rec->dst_addr = expired->flow.nw_dst; - nf_rec->nexthop = htons(0); + nf_rec->nexthop = htonl(0); if (nf->add_id_to_iface) { uint16_t iface = (nf->engine_id & 0x7f) << 9; nf_rec->input = htons(iface | (expired->flow.in_port & 0x1ff));