-
Notifications
You must be signed in to change notification settings - Fork 56
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
bridge and interface details from /sys/class/net/ is objectionable for embedded platform #20
Comments
that is an open discussion about how low (embedded) we should go |
sometime user want to mix of sysfs and other API to get interfaces or port details. if this moved to driver_deps.c user can easily tweak the code to get port details on embedded platform. |
What information do we have in sysfs that we don't via netlink? |
Embedded platform like OpenWRT use libnl-tiny ( This package contains a stripped down version of libnl ) which is one more issue other than sysfs that MSTP code has to take care of. |
Netlink should be more than enough to implement mstpd. If it is missing some attributes, this should be fixed upstream. ioctl's are deprecated and sysfs is made for user confort, not for robust userspace daemon. So I guess we should track and convert any non-netlink calls to nl-based API (libnl-tiny might work just fine). |
Below mentioned issue I have separately raised which is because of libnl-tiny: mstp could not listen 802.2 STP traffic- in packet.c -- s = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_802_2)); this line of code need to be updated to s = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); which is highly dangerous and I found crashes of mstpd when there is some huge traffic. Need to explore more about netlink and its variants. |
Please don't double post issues, you already posted this here (you can still reference them though). |
current MSTP source use interface duplex, speed, state etc from /sys/class/net/
but this should be moved to driver_deps.c as many embedded platform do not have fully grown switch driver and sysfs do not show real status of interface.
driver_deps.c with #define SYSFS_EN 1 should help user select if platform do not support sysfs for switch and he can write to get this details from switch instead in mstp source.
The text was updated successfully, but these errors were encountered: