From: Ben Pfaff Date: Thu, 20 Nov 2008 18:07:22 +0000 (-0800) Subject: Fix printing of IP addresses in ofp_print_action(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd120a03be4d48a6a95fc6a20642cf0084d6563f;p=openvswitch Fix printing of IP addresses in ofp_print_action(). IP_ARGS takes a pointer, not a raw IP address. Thanks to kk yap for reporting the problem. --- diff --git a/lib/ofp-print.c b/lib/ofp-print.c index c3c1c711..c145b3d1 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -398,13 +398,13 @@ ofp_print_action(struct ds *string, const struct ofp_action_header *ah, case OFPAT_SET_NW_SRC: { struct ofp_action_nw_addr *na = (struct ofp_action_nw_addr *)ah; - ds_put_format(string, "mod_nw_src:"IP_FMT, IP_ARGS(na->nw_addr)); + ds_put_format(string, "mod_nw_src:"IP_FMT, IP_ARGS(&na->nw_addr)); break; } case OFPAT_SET_NW_DST: { struct ofp_action_nw_addr *na = (struct ofp_action_nw_addr *)ah; - ds_put_format(string, "mod_nw_dst:"IP_FMT, IP_ARGS(na->nw_addr)); + ds_put_format(string, "mod_nw_dst:"IP_FMT, IP_ARGS(&na->nw_addr)); break; }