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

Promiscuous mode off fixes #11303

Merged
merged 2 commits into from Nov 13, 2018
Merged

Conversation

jukkar
Copy link
Member

@jukkar jukkar commented Nov 12, 2018

No description provided.

return;
}

#if defined(CONFIG_NET_L2_ETHERNET)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you try using IS_ENABLED instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is currently not possible as the ETHERNET symbol is only available if CONFIG_NET_L2_ETHERNET is set. But I can refactor the functions a bit more in order to avoid duplication. I will send a new version.

@codecov-io
Copy link

codecov-io commented Nov 12, 2018

Codecov Report

Merging #11303 into master will increase coverage by <.01%.
The diff coverage is 80%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11303      +/-   ##
==========================================
+ Coverage   51.55%   51.56%   +<.01%     
==========================================
  Files         216      216              
  Lines       27665    27671       +6     
  Branches     6937     6938       +1     
==========================================
+ Hits        14263    14268       +5     
- Misses      10653    10654       +1     
  Partials     2749     2749
Impacted Files Coverage Δ
subsys/net/ip/net_if.c 62.46% <80%> (+0.1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 064074e...c0b82ef. Read the comment docs.

@jukkar
Copy link
Member Author

jukkar commented Nov 12, 2018

New version:

  • refactoring the promisc set/unset functions, now there is common function that does common things
  • fixed sanity error

Pass the promiscuous mode OFF event properly to device driver
instead of just toggling the network interface flag.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add a shell that implements "promisc [on | off] <interface>"
command to toggle promiscuous mode support.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
@jukkar jukkar merged commit 1a67e06 into zephyrproject-rtos:master Nov 13, 2018
@jukkar jukkar deleted the promisc-mode branch November 13, 2018 10:53
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.

None yet

4 participants