aboutsummaryrefslogtreecommitdiff
path: root/src/net/eth_slow.c
AgeCommit message (Collapse)AuthorFilesLines
2020-10-14[lacp] Ignore (and do not echo) trailing padding on received packetsMichael Brown1-0/+3
The LACP responder reuses the received I/O buffer to construct the response LACP (or marker) packet. Any received padding will therefore be unintentionally included within the response. Truncate the received I/O buffer to the expected length (which is already defined in a way to allow for future protocol expansion) before reusing it to construct the response. Reported-by: Tore Anderson <tore@fud.no> Signed-off-by: Michael Brown <mcb30@ipxe.org>
2020-10-14[lacp] Detect and ignore erroneously looped back LACP packetsMichael Brown1-0/+8
Some external drivers (observed with the UEFI NII driver provided by an HPE-branded Mellanox ConnectX-3 Pro) seem to cause LACP packets transmitted by iPXE to be looped back as received packets. Since iPXE's trivial LACP responder will send one response per received packet, this results in an immediate LACP packet storm. Detect looped back LACP packets (based on the received LACP actor MAC address), and refuse to respond to such packets. Reported-by: Tore Anderson <tore@fud.no> Tested-by: Tore Anderson <tore@fud.no> Signed-off-by: Michael Brown <mcb30@ipxe.org>
2018-03-19[lacp] Check the partner's own state when checking for blocked linksMichael Brown1-4/+4
The blocked link test in eth_slow_lacp_rx() is performed before the actor TLV is copied to the partner TLV, and so must test the actor state field rather than the partner state field. Signed-off-by: Michael Brown <mcb30@ipxe.org>
2018-03-18[lacp] Fix debug message to match documentationMichael Brown1-1/+1
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2018-03-18[lacp] Mark link as blocked if partner is not yet up and runningMichael Brown1-0/+22
Mark the link as blocked if the LACP partner is not reporting itself as being in sync, collecting, and distributing. This matches the behaviour for STP: we mark the link as blocked if we detect that the switch is actively blocking traffic, in order to extend the DHCP discovery period and so prevent boot failures on switches that take an excessively long time to enable ports. Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-02[legal] Relicense files under GPL2_OR_LATER_OR_UBDLMichael Brown1-1/+5
These files cannot be automatically relicensed by util/relicense.pl since they either contain unusual but trivial contributions (such as the addition of __nonnull function attributes), or contain lines dating back to the initial git revision (and so require manual knowledge of the code's origin). Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-07-23[lacp] Set "aggregatable" flag in response LACPDUSven Ulland1-1/+2
Some switches do not allow an individual link (as defined in IEEE Std 802.3ad-2000 section 43.3.5) to work alone in a link aggregation group as described in section 43.3.6. This is verified on Dell's PowerConnect M6220, based on the Broadcom Strata XGS-IV chipset. Set the LACP_STATE_AGGREGATABLE flag in the actor.state field to announce link aggregation in the response LACPDU, which will have the switch enable the link aggregation group and allow frames to pass. Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-20[legal] Update FSF mailing address in GPL licence textsMichael Brown1-1/+2
Suggested-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-07-15[netdevice] Allow link layer to report broadcast/multicast packets via pull()Michael Brown1-1/+3
Allow the link layer to directly report whether or not a packet is multicast or broadcast at the time of calling pull(), rather than relying on heuristics to determine this at a later stage. Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-11-18[lacp] Fix dumping of raw LACP packetsMichael Brown1-2/+2
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-11-18[netdevice] Use net device name in debugging messagesMichael Brown1-10/+10
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-10-07[netdevice] Pass both link-layer addresses in net_tx() and net_rx()Michael Brown1-2/+5
FCoE requires the use of fabric-provided MAC addresses, which breaks the assumption that the net device's MAC address is implicitly the source address for net_tx() and the (unicast) destination address for net_rx(). Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-08-20[build] Fix misaligned table entries when using gcc 4.5Piotr Jaroszyński1-1/+1
Declarations without the accompanying __table_entry cause misalignment of the table entries when using gcc 4.5. Fix by adding the appropriate __table_entry macro or (where possible) by removing unnecessary forward declarations. Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-05-10[lacp] Add simple LACP implementationMichael Brown1-0/+267
Some switch configurations will refuse to enable our port unless we can speak LACP to inform the switch that we are alive. Add a very simple passive LACP implementation that is sufficient to convince at least Linux's bonding driver (when tested using qemu attached to a tap device enslaved to a bond device configured as "mode=802.3ad"). Signed-off-by: Michael Brown <mcb30@ipxe.org>