Bug 2157 - OpenFlowSwitchNetDevice::BufferFromPacket setting eth_type incorrectly
OpenFlowSwitchNetDevice::BufferFromPacket setting eth_type incorrectly
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: openflow
pre-release
PC Linux
: P5 enhancement
Assigned To: ns-bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-07-17 12:50 EDT by Tom Henderson
Modified: 2015-09-03 01:58 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Henderson 2015-07-17 12:50:59 EDT
Reported by Kang Chen on ns-developers list.


1.       Line 471:   eth_h->eth_type = htons (ETH_TYPE_IP); // Ether Type

By setting to ETH_TYPE_IP, even arp packets get Ethernet type 0x800 in the
flow key. Actually, the function parameter "protocol" tells whether an IP or
ARP packet is processed. I then modified it to:

If(protocol === ArpL3Protocol::PROT_NUMBER)

              eth_h->eth_type = htons (ETH_TYPE_ARP); // Ether Type

else

               eth_h->eth_type = htons (ETH_TYPE_IP); // Ether Type
Comment 1 Tom Henderson 2015-09-03 01:58:43 EDT
committed in 11627:01fcacb5eedf