diff options
author | Ben Pfaff <blp@nicira.com> | 2012-12-12 15:26:21 -0800 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2012-12-12 15:26:21 -0800 |
commit | ed36537ebf48108accf21a8aa073279eceeafa98 (patch) | |
tree | e5e11cd63c50f7fe16437609d72914502ee29aad /lib/netdev-vport.c | |
parent | 401d5a6d16438ceb2e09c19677b97504593b4b51 (diff) |
packets: Change IP_ARGS interface to take an ovs_be32 instead of a pointer.
An ovs_be32 is a more obvious way to represent an IP address than a
pointer to one. It is also more type-safe, especially since "sparse" is
able to check that the argument is in network byte order.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
Diffstat (limited to 'lib/netdev-vport.c')
-rw-r--r-- | lib/netdev-vport.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/netdev-vport.c b/lib/netdev-vport.c index 530fd206..2b493a7f 100644 --- a/lib/netdev-vport.c +++ b/lib/netdev-vport.c @@ -810,11 +810,11 @@ unparse_tunnel_config(const char *name OVS_UNUSED, const char *type OVS_UNUSED, daddr = nl_attr_get_be32(a[OVS_TUNNEL_ATTR_DST_IPV4]); - smap_add_format(args, "remote_ip", IP_FMT, IP_ARGS(&daddr)); + smap_add_format(args, "remote_ip", IP_FMT, IP_ARGS(daddr)); if (a[OVS_TUNNEL_ATTR_SRC_IPV4]) { ovs_be32 saddr = nl_attr_get_be32(a[OVS_TUNNEL_ATTR_SRC_IPV4]); - smap_add_format(args, "local_ip", IP_FMT, IP_ARGS(&saddr)); + smap_add_format(args, "local_ip", IP_FMT, IP_ARGS(saddr)); } if (!a[OVS_TUNNEL_ATTR_IN_KEY] && !a[OVS_TUNNEL_ATTR_OUT_KEY]) { |