Bug 2157

Summary: OpenFlowSwitchNetDevice::BufferFromPacket setting eth_type incorrectly
Product: ns-3 Reporter: Tom Henderson <tomh>
Component: openflowAssignee: ns-bugs <ns-bugs>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: P5    
Version: pre-release   
Hardware: PC   
OS: Linux   

Description Tom Henderson 2015-07-17 12:50:59 UTC
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 UTC
committed in 11627:01fcacb5eedf