Skip to content

[dhcp_relay] Fix sendto: invalid destination address error#9143

Merged
kellyyeh merged 1 commit intomasterfrom
kellyyeh-dhcp6relay-fix
Nov 2, 2021
Merged

[dhcp_relay] Fix sendto: invalid destination address error#9143
kellyyeh merged 1 commit intomasterfrom
kellyyeh-dhcp6relay-fix

Conversation

@kellyyeh
Copy link
Contributor

@kellyyeh kellyyeh commented Nov 2, 2021

Why I did it

Not all relay forward packets are sent to desired dhcpv6_servers.
Sendto error: invalid destination address

How I did it

Memory gets deallocated at end of loop_relay, need to allocate object on the heap.

How to verify it

Build dhcp6relay debian package and run dhcpv6 relay tests

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106

Description for the changelog

A picture of a cute animal (not mandatory but encouraged)

@lguohan lguohan requested a review from saiarcot895 November 2, 2021 14:29
@kellyyeh kellyyeh marked this pull request as ready for review November 2, 2021 17:40
@kellyyeh kellyyeh requested a review from lguohan as a code owner November 2, 2021 17:40
@kellyyeh kellyyeh requested a review from yxieca November 2, 2021 17:55
@kellyyeh kellyyeh merged commit 1067bc8 into master Nov 2, 2021
@lguohan
Copy link
Collaborator

lguohan commented Nov 2, 2021

why we could not catch this issue in the sonic-mgmt test?

@kellyyeh
Copy link
Contributor Author

kellyyeh commented Nov 2, 2021

@lguohan There were 4 server addresses, and only one was affected, so packets were still successfully relayed to the other three destination addresses. Sonic-mgmt only checks if >=1 expected packet is received.

@kellyyeh kellyyeh deleted the kellyyeh-dhcp6relay-fix branch November 3, 2021 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants