-
Notifications
You must be signed in to change notification settings - Fork 198
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
Soft mac filtering #349
Soft mac filtering #349
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with ART tester, and it works fine
@@ -122,6 +149,18 @@ int pf_eth_recv (pnal_eth_handle_t * eth_handle, void * arg, pnal_buf_t * p_buf) | |||
uint16_t ix = 0; | |||
pnet_t * net = (pnet_t *)arg; | |||
|
|||
#ifndef UNIT_TEST | |||
/* Reject unicast packets with destination not matching |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be better if unicast filtering was done at a lower level (ie pnal)? Documentation could be added to pnal_eth_init() to require that incoming frames with unknown unicast destination MAC address should be dropped.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, we will start with only stop using promiscuous mode and retest to verify that this solves the original problem.
Moved initialization of mac addresses and lldp port name to stack.
Do not store alias name for each LLDP peer. Instead build and check alias when alias is part of id request received. Exclude alias name from DCP response as it shall only be used for filtering requests.
94dfe7c
to
d864b4f
Compare
In promiscuous mode, ignore unicast packets that are not for this device.
Based on top of #333 and #348