[ovs-dev] [PATCH ovn] IPv6 PD: assume status to be Success if not present

Numan Siddique numans at ovn.org
Mon Apr 27 10:32:52 UTC 2020


On Sat, Apr 25, 2020 at 3:48 PM Lorenzo Bianconi
<lorenzo.bianconi at redhat.com> wrote:
>
> According to the RFC3315 (section 22.13. Status Code Option),
> if status code option is not present in the delegation server
> reply, it will be assumed to be Success. In this particular case,
> do not stop IPv6 PD state machine
>
> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi at redhat.com>

Thanks Lorenzo. I applied this patch to master.

Numan

> ---
>  controller/pinctrl.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/controller/pinctrl.c b/controller/pinctrl.c
> index 7ac487f05..3230bb386 100644
> --- a/controller/pinctrl.c
> +++ b/controller/pinctrl.c
> @@ -852,12 +852,15 @@ pinctrl_parse_dhcpv6_reply(struct dp_packet *pkt_in,
>                      }
>                      prefix_len = ia_hdr->plen;
>                      memcpy(&ipv6, &ia_hdr->ipv6, sizeof (struct in6_addr));
> +                    status = true;
>                  }
>                  if (ntohs(in_opt->code) == DHCPV6_OPT_STATUS_CODE) {
>                     struct dhcpv6_opt_status *status_hdr;
>
>                     status_hdr = (struct dhcpv6_opt_status *)in_opt;
> -                   status = ntohs(status_hdr->status_code) == 0;
> +                   if (ntohs(status_hdr->status_code)) {
> +                       status = false;
> +                   }
>                  }
>                  size += sizeof *in_opt + ntohs(in_opt->len);
>                  in_opt = (struct dhcpv6_opt_header *)(in_dhcpv6_data + size);
> --
> 2.25.3
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>


More information about the dev mailing list