]> git.proxmox.com Git - mirror_ovs.git/commit
xlate: use const struct in6_addr in linklocal check
authorAaron Conole <aconole@redhat.com>
Tue, 10 Jul 2018 13:34:38 +0000 (09:34 -0400)
committerBen Pfaff <blp@ovn.org>
Tue, 10 Jul 2018 16:18:12 +0000 (09:18 -0700)
commit6f231f7c3a9ed51617b3d284dd5bf6fd82b3d7bd
treedb77612c3ea11d6793176e011dbb0d7b76eedd87
parentb22fb00c65e5ad00ba7373130fd469a6b7ed0291
xlate: use const struct in6_addr in linklocal check

Commit 83c2757bd16e ("xlate: Move tnl_neigh_snoop() to
terminate_native_tunnel()") introduced a call to
IN6_IS_ADDR_MC_LINKLOCAL() when checking neighbor discovery.

The call to this assumes that the argument may be a const uint8_t *.
According to The Open Group Base Specifications Issue 7, 2018:

    macro is of type int and takes a single argument of
    type const struct in6_addr *

The GNU implementation allows a bit of flexibility, by internally
casting the argument.  However, other implementations (such as OS X)
more rigidly implement the standard and fail with errors like:

    error: member reference base type 'const uint8_t'
           (aka 'const unsigned char') is not a structure or union

Fixes: 83c2757bd16e ("xlate: Move tnl_neigh_snoop() to terminate_native_tunnel()")
Cc: Zoltan Balogh <zoltan.balogh.eth@gmail.com>
Cc: Jan Scheurich <jan.scheurich@ericsson.com>
Signed-off-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
ofproto/ofproto-dpif-xlate.c