[ovs-git] [ovn-org/ovn] 7d19cc: Avoid case-sensitive MAC address comparisons.

Mark Michelson noreply at github.com
Fri Jun 26 14:20:46 UTC 2020


  Branch: refs/heads/branch-20.06
  Home:   https://github.com/ovn-org/ovn
  Commit: 7d19cc445e2956f75893c8ecd6b3b5380cb200de
      https://github.com/ovn-org/ovn/commit/7d19cc445e2956f75893c8ecd6b3b5380cb200de
  Author: Mark Michelson <mmichels at redhat.com>
  Date:   2020-06-26 (Fri, 26 Jun 2020)

  Changed paths:
    M northd/ovn-northd.c
    M tests/ovn.at
    M utilities/ovn-nbctl.c

  Log Message:
  -----------
  Avoid case-sensitive MAC address comparisons.

Hex digits in MAC addresses can be represented as either capital or
lowercase, and they're equal. Using strcmp to compare MAC addresses has
the potential to compare MAC addresses as different when they represent
the same address.

This commit fixes the issue by converting the string representation to
the binary representation and comparing that instead.

Reported at: https://bugzilla.redhat.com/show_bug.cgi?id=1829059
Signed-off-by: Mark Michelson <mmichels at redhat.com>
Acked-by: Numan Siddique <numans at ovn.org>
Fixes: ba0d6eae960d("ovn-northd: Add support for Load Balancer health check")


  Commit: ef097892a3a3c5ad24afad81d3a5730d0c1b127c
      https://github.com/ovn-org/ovn/commit/ef097892a3a3c5ad24afad81d3a5730d0c1b127c
  Author: Mark Michelson <mmichels at redhat.com>
  Date:   2020-06-26 (Fri, 26 Jun 2020)

  Changed paths:
    M tests/ovn.at
    M utilities/ovn-nbctl.c

  Log Message:
  -----------
  Use normalized IP addresses in `ovn-nbctl lrp-add`

Signed-off-by: Mark Michelson <mmichels at redhat.com>
Acked-by: Numan Siddique <numans at ovn.org>


  Commit: 9367c5b49c0cd9a8917e1966b093581ed90d0fb2
      https://github.com/ovn-org/ovn/commit/9367c5b49c0cd9a8917e1966b093581ed90d0fb2
  Author: Mark Michelson <mmichels at redhat.com>
  Date:   2020-06-26 (Fri, 26 Jun 2020)

  Changed paths:
    M utilities/ovn-nbctl.c

  Log Message:
  -----------
  Add more IP address normalization functions.

Normalization of IP addresses helps to fix common pitfalls when
comparing addresses:
* Case-sensitivity in IPv6 addresses
* Different valid represntations of netmasks

This commit adds new normalization functions and cleans up some of the
existing ones.

The new functions are not used in this commit but will be used in later
commits in this series.

Signed-off-by: Mark Michelson <mmichels at redhat.com>
Acked-by: Numan Siddique <numans at ovn.org>


  Commit: 0d624ca9e769b93650d11b9bf48caebb451a21f3
      https://github.com/ovn-org/ovn/commit/0d624ca9e769b93650d11b9bf48caebb451a21f3
  Author: Mark Michelson <mmichels at redhat.com>
  Date:   2020-06-26 (Fri, 26 Jun 2020)

  Changed paths:
    M tests/ovn.at
    M utilities/ovn-nbctl.c

  Log Message:
  -----------
  Use normalized IP addreses in `ovn-nbctl lr-nat-add`

Signed-off-by: Mark Michelson <mmichels at redhat.com>
Acked-by: Numan Siddique <numans at ovn.org>


  Commit: da7aab095dc8c7ab34739a22001018de3fd2cad6
      https://github.com/ovn-org/ovn/commit/da7aab095dc8c7ab34739a22001018de3fd2cad6
  Author: Mark Michelson <mmichels at redhat.com>
  Date:   2020-06-26 (Fri, 26 Jun 2020)

  Changed paths:
    M tests/ovn.at
    M utilities/ovn-nbctl.c

  Log Message:
  -----------
  Use normalized IP addresses in `ovn-nbctl lr-nat-del`

Signed-off-by: Mark Michelson <mmichels at redhat.com>
Acked-by: Numan Siddique <numans at ovn.org>


  Commit: b738f8b0aa648b118c63e627fd75c40332dcc27a
      https://github.com/ovn-org/ovn/commit/b738f8b0aa648b118c63e627fd75c40332dcc27a
  Author: Mark Michelson <mmichels at redhat.com>
  Date:   2020-06-26 (Fri, 26 Jun 2020)

  Changed paths:
    M tests/ovn-nbctl.at
    M utilities/ovn-nbctl.c

  Log Message:
  -----------
  Cleanup `ovn-nbctl lr-route-add` IP normalization logic.

Use newer IP normalization routines to make things much cleaner.

Signed-off-by: Mark Michelson <mmichels at redhat.com>
Acked-by: Numan Siddique <numans at ovn.org>


Compare: https://github.com/ovn-org/ovn/compare/427a8dcd2fe8...b738f8b0aa64


More information about the git mailing list