Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] send_packet_out() can cause a segmentation fault if used in a transparent service #212

Closed
DavideAG opened this issue Sep 17, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@DavideAG
Copy link
Contributor

Describe the bug

send_packet_out () can cause a segmentation fault if used in a transparent service if the parent does not exist

To Reproduce

Use the tutorial 1 configuration (https://polycube.readthedocs.io/en/latest/tutorials/tutorial1/tutorial1.html)

  1. create a new transparent service that uses send_packet_out
  2. attach it to veth1
  3. execute a ping
  4. segmentation fault

Expected behavior

the service should indicate that the parent does not exist

Please tell us about your environment:

  1. OS details: Ubuntu 18.04
  2. Kernel details: 5.15.0-55-generic
  3. Polycube Version: 0.1.0-beta+
  4. Polycube Log: "Segmentation Fault"

Additional context

you need to check if the father exists.
Like

logger->warn("packetout: port {0}:{1} is down", parent_.get_name(), name_);

The error is here:

Port *parent = dynamic_cast<Port *>(parent_);

@DavideAG DavideAG added the bug Something isn't working label Sep 17, 2019
@goldenrye
Copy link
Contributor

This bug will be fixed by the commit under issue 218

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants