On 15/11/2022 05:35, Ryo Shimizu wrote:
Since l2_sha continues to point outside of m_data manipulated by m_adj(), it can be corrupted by subsequent m_pullup() or other mbuf m_*() operations. I still believe that using MTAG is appropriate. How about something like this? (not tested)
Wow, that looks good and works well. I've comitted it, thanks.
Since l2_shalen is fixed to ETHER_ADDR_LEN for now, the tag name should be PACKET_TAG_ETHERNET_SRC instead of PACKET_TAG_L2SHA for now. If all L2 addresses are to be treated extensively, the structure of mtag should include the size, but that will not be necessary just yet.
I'm happy with that. Roy