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

ip4_forward return? (IDFGH-9883) #55

Closed
briliant-ben opened this issue Apr 15, 2023 · 2 comments
Closed

ip4_forward return? (IDFGH-9883) #55

briliant-ben opened this issue Apr 15, 2023 · 2 comments

Comments

@briliant-ben
Copy link

ip4_forward(p, (struct ip_hdr *)p->payload, inp);

If ip_forward successfully forwards the pbuf, then why not consider going straight back without the need for further steps? I am confused, please enlighten!

@github-actions github-actions bot changed the title ip4_forward return? ip4_forward return? (IDFGH-9883) Apr 15, 2023
@david-cermak
Copy link
Collaborator

after calling the ip4_forward() (no matter if successfully or not) we are going straight back, are we not?

pbuf_free(p);
return ERR_OK;

which further steps you mean? The latter call of pbuf_free() or checking/adding an error code to the function?

@briliant-ben
Copy link
Author

You are right, I see. I missed close brace here, thanks for explanation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants