I'm working on an embedded platform with very limited resources where I need to build my own Ethernet frames.
If I need to answer a UDP request with a UDP reply, is it ever not OK to just send the reply back to the Ethernet source MAC address of the request packet instead of doing a full ARP lookup of the source IP address?
If so, a list of concrete examples where a reply would need to be sent to a different MAC address than the request came from would be very useful.
Clearly, if the request originator changed their own MAC address right after sending the request, that would be a trivial example, but let's ignore that case.
What comes to mind for me is if you have asymmetric routing between your hosts A and B (I use B for the embedded device in the question).
Ie, a network setup such that the route from A to B is not the same as from B to A.
Example:
In this case B would see router1's MAC address, but should send to router2's MAC address (discovered by examining its routing table and then ARP table).
Not your most typical setup, but entirely possible and much less of an edge case than a host in the same network that switches MAC addresses just as you are handling a packet.