Page MenuHomeFreeBSD

Fix CARP echo back for ESX vSwitch
Needs ReviewPublic

Authored by slw_zxy.spb.ru on Jul 1 2022, 1:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 16, 2:39 PM
Unknown Object (File)
Thu, Apr 11, 5:09 PM
Unknown Object (File)
Dec 20 2023, 3:38 AM
Unknown Object (File)
Dec 13 2023, 4:04 PM
Unknown Object (File)
Nov 17 2023, 5:09 PM
Unknown Object (File)
Nov 17 2023, 4:05 PM
Unknown Object (File)
Nov 11 2023, 7:16 AM
Unknown Object (File)
Nov 10 2023, 4:23 PM

Details

Summary

The 8151740c881f1f400dab7a3f4c7bb23439c11b66 commit introduces a workaround for the vSwitch bug, where an interface accepts a sent back multicast announcement. And that doesn't work at the moment:
IFNET_FOREACH_IFA iterates only addresses with non-zero ifa_carp, and the packet is sent with ifa_carp == NULL (i.e. from a general, non-carp source).
Also, it is checked that the carp_vhid field in the received packet is 0, but vhid should be from 1 to 255.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

I'd rather do it slightly differently - there is already carp_forus_p() hook that is called in ether_input_internal(). I'd extend it to pass the source MAC there as well so the routine can check if this is the looped packet.
If the latter is true, I'd stamp mbuf with either M_LOOP or M_PROMISC flag to ensure it will be dropped early enough.