I brought ip_insertoptions function, and slightly modified to change
the ip_hl variable of the packet.
As you see, it's not fully implemented, so it just add an intermediate
address before the destination.
The problem is that even though I changed the ip_dst value of the
packet(through ip_insertoption) to the intermediate address, when I
captured the output packet, the mac address did not change.
It was the mac address of the original destination.
According to my understanding, when this hook was called, the mac
header does not exist, and
after processing of this hook, the mac processing is done.
So, I think the mac address is determined by the new ip address.
Am I right? And do you have any suggestion to solve this problem?