tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Question about pfil



임영빈 wrote:
...
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?

While the MAC header isn't present, the route out has already
been chosen before the hook is called and this implies the
selection of the destination MAC address.  This is either a
bug or a feature, depending on how you look at it.

Darren



Home | Main Index | Thread Index | Old Index