[Ns-developers] Requesting help for csma promiscuous mode
Gustavo Carneiro
gjcarneiro at gmail.com
Fri Jul 4 10:00:06 PDT 2008
Never mind the help request. Fixing this was simple (
http://code.nsnam.org/gjc/ns-3-learning-bridge/rev/9a662068646f).
Sorry for the noise.
2008/7/4 Gustavo Carneiro <gjcarneiro at gmail.com>:
> CsmaNetDevice has this comment in method Receive:
>
> //
> // We never forward up packets that we sent. Real devices don't do this
> since
> // their receivers are disabled during send, so we don't. Drop the packet
> // silently (no tracing) since it would really never get here in a real
> device.
> //
> if (header.GetSource () == GetAddress ())
> {
> NS_LOG_LOGIC ("Ignoring packet sourced by this device");
> return;
> }
>
> It turns out that with the combination of promiscuous mode receiving and
> SendFrom (for "MAC spoofing", i.e. transmit frame with another source
> address), needed to implement a bridge, it is no longer true that packets
> sent by this netdevice have a source mac address equal to the netdevice's
> own address. Because of this I am getting infinite packet forwarding loops.
>
> The comment above is enlightening, and leads be to believe the best
> solution is to do what real devices do, i.e. disable their receiver during
> packet transmission. I am going to try to do this, assuming it to be ok.
> But any hint is appreciated.
>
> Thanks.
>
> --
> Gustavo J. A. M. Carneiro
> INESC Porto, Telecommunications and Multimedia Unit
> "The universe is always one step beyond logic." -- Frank Herbert
--
Gustavo J. A. M. Carneiro
INESC Porto, Telecommunications and Multimedia Unit
"The universe is always one step beyond logic." -- Frank Herbert
More information about the Ns-developers
mailing list