diff mbox series

[ovs-dev,branch-2.12,ovn-northd] Don't emit ICMP need to frag on LRP with no IPv4 address

Message ID 20190805155214.68861-1-dalvarez@redhat.com
State Accepted
Headers show
Series [ovs-dev,branch-2.12,ovn-northd] Don't emit ICMP need to frag on LRP with no IPv4 address | expand

Commit Message

Daniel Alvarez Sanchez Aug. 5, 2019, 3:52 p.m. UTC
Prior to this patch, when a LRP has only IPv6 addresses, ovn-northd
will crash (SIGSEV) because the current code injects a flow to
emit the ICMP need-to-frag from its IPv4 address which does not
exist.

This patch is adding a check to skip the flow installation in case
the port does not have any IPv4 address.

Signed-off-by: Daniel Alvarez <dalvarez@redhat.com>
---
 ovn/northd/ovn-northd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--
1.8.3.1

Comments

Justin Pettit Aug. 8, 2019, 5:08 p.m. UTC | #1
Thanks.  I added a reference to the OVN repo commit and merged this into branch-2.12.

--Justin


> On Aug 5, 2019, at 8:52 AM, Daniel Alvarez <dalvarez@redhat.com> wrote:
> 
> Prior to this patch, when a LRP has only IPv6 addresses, ovn-northd
> will crash (SIGSEV) because the current code injects a flow to
> emit the ICMP need-to-frag from its IPv4 address which does not
> exist.
> 
> This patch is adding a check to skip the flow installation in case
> the port does not have any IPv4 address.
> 
> Signed-off-by: Daniel Alvarez <dalvarez@redhat.com>
> ---
> ovn/northd/ovn-northd.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c
> index ae09cf338..21e546d38 100644
> --- a/ovn/northd/ovn-northd.c
> +++ b/ovn/northd/ovn-northd.c
> @@ -7855,7 +7855,8 @@ build_lrouter_flows(struct hmap *datapaths, struct hmap *ports,
>             for (size_t i = 0; i < od->nbr->n_ports; i++) {
>                 struct ovn_port *rp = ovn_port_find(ports,
>                                                     od->nbr->ports[i]->name);
> -                if (!rp || rp == od->l3dgw_port) {
> +                if (!rp || rp == od->l3dgw_port ||
> +                    !rp->lrp_networks.ipv4_addrs) {
>                     continue;
>                 }
>                 ds_clear(&match);
> --
> 1.8.3.1
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
diff mbox series

Patch

diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c
index ae09cf338..21e546d38 100644
--- a/ovn/northd/ovn-northd.c
+++ b/ovn/northd/ovn-northd.c
@@ -7855,7 +7855,8 @@  build_lrouter_flows(struct hmap *datapaths, struct hmap *ports,
             for (size_t i = 0; i < od->nbr->n_ports; i++) {
                 struct ovn_port *rp = ovn_port_find(ports,
                                                     od->nbr->ports[i]->name);
-                if (!rp || rp == od->l3dgw_port) {
+                if (!rp || rp == od->l3dgw_port ||
+                    !rp->lrp_networks.ipv4_addrs) {
                     continue;
                 }
                 ds_clear(&match);