Skip to content

Commit

Permalink
IPv6 PD: assume status to be Success if not present
Browse files Browse the repository at this point in the history
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@redhat.com>
Signed-off-by: Numan Siddique <numans@ovn.org>
  • Loading branch information
LorenzoBianconi authored and numansiddique committed Apr 27, 2020
1 parent 07d97f1 commit 093f229
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion controller/pinctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 093f229

Please sign in to comment.