inet-framework / inet

INET Framework for the OMNeT++ discrete event simulator
https://inet.omnetpp.org
Other
442 stars 488 forks source link

Macforwardingconfigurator bug fix not in the release #914

Closed lukefadedaway closed 1 year ago

lukefadedaway commented 1 year ago

This bug is still in INET version: 4.5.2 ( https://github.com/inet-framework/inet/issues/880 )

Apparently this fix wasn't correctly pushed to the releases.

To reproduce this bug, use these two files: (Configuration A-to-B will run without the bug because B is not the first Device in the ini file. B-to-A will show the bug because A is the first device and therefore can't bee addressed) bugtest.ini :

[A-to-B]
network = bugtest

*.*.eth[*].bitrate = 1Gbps

*.A.numApps = 1
*.A.app[0].typename = "UdpSourceApp"
*.A.app[0].display-name = "A-B"
*.A.app[0].io.destAddress = "B"
*.A.app[0].io.destPort = 1000 
*.A.app[*].source.packetNameFormat = "%M-%m-%c"
*.A.app[0].source.packetLength = 1200B 
*.A.app[0].source.productionInterval = 490000ns  

# server applications
*.B.numApps = 1
*.B.app[*].typename = "UdpSinkApp"
*.B.app[0].display-name = "A-B"
*.B.app[0].io.localPort = 1000 

[B-to-A]
network = bugtest

*.*.eth[*].bitrate = 1Gbps

*.B.numApps = 1
*.B.app[0].typename = "UdpSourceApp"
*.B.app[0].display-name = "B-A"
*.B.app[0].io.destAddress = "A"
*.B.app[0].io.destPort = 1000 
*.B.app[*].source.packetNameFormat = "%M-%m-%c"
*.B.app[0].source.packetLength = 1200B 
*.B.app[0].source.productionInterval = 490000ns  

# server applications
*.A.numApps = 1
*.A.app[*].typename = "UdpSinkApp"
*.A.app[0].display-name = "B-A"
*.A.app[0].io.localPort = 1000 

bugtest.ned :

import inet.networks.base.TsnNetworkBase;
import inet.node.ethernet.EthernetLink;
import inet.node.tsn.TsnDevice;
import inet.node.tsn.TsnSwitch;

network bugtest extends TsnNetworkBase
{
    submodules:

        switch: TsnSwitch {
            @display("p=650,400");
        }
        A: TsnDevice {
            @display("p=496,401");
        }
        B: TsnDevice {
            @display("p=650,254");
        }
        C: TsnDevice {
            @display("p=818,401");
        }

    connections:
        switch.ethg++ <--> EthernetLink {  delay = 200ns; } <--> A.ethg++;
        switch.ethg++ <--> EthernetLink {  delay = 200ns; } <--> B.ethg++;
        switch.ethg++ <--> EthernetLink {  delay = 200ns; } <--> C.ethg++;
}

Packet A-to-B going the correct path:

A-to-B Packet

Packet B-to-A not being able to be correctly routed:

B-to-A Packet

Originally posted by @lukefadedaway in https://github.com/inet-framework/inet/issues/880#issuecomment-1753479231

levy commented 1 year ago

The fix is not included to 4.5.2 by mistake, It's available in the master branch though. I have tested it and it work as expected.

haug-den-lucas commented 1 month ago

The fix is also not present in 4.5.3 Would be great if this could be included in the next release.

levy commented 1 month ago

This fix will be part of 4.5.4, it's already added to the v4.5.x branch.