IP stack modification of packet data

Hi,

I’m looking at some Ethernet bridging code which sits above Ethernet drivers
(an en-en filter). When the bridge doesn’t know which interface to send an
Ethernet packet to it broadcasts it to all interfaces. It does this without
any copying by using a new npkt_t for each interface and pointing them to
the same packet data. Only when all interfaces have finished with the packet
data is the original npkt released.

The problem I have is that it appears that the (big) IP stack is modifying
some of the packet data - which of course affects all other interfaces using
the same data.

Does the IP stack modify the packet contents of data passed up ?
Is there any way of stopping it ?

Thanks in advance

Poseidon <paul.ryan2@nospam.virgin.net> wrote:

Hi,

I’m looking at some Ethernet bridging code which sits above Ethernet drivers
(an en-en filter). When the bridge doesn’t know which interface to send an
Ethernet packet to it broadcasts it to all interfaces. It does this without
any copying by using a new npkt_t for each interface and pointing them to
the same packet data. Only when all interfaces have finished with the packet
data is the original npkt released.

The problem I have is that it appears that the (big) IP stack is modifying
some of the packet data - which of course affects all other interfaces using
the same data.

Does the IP stack modify the packet contents of data passed up ?

Yes.

Is there any way of stopping it ?

No. You have to copy the packet yourself.

-xtang