Inconsistency in Pkt class
There are members iface_ and ifindex_ in Pkt class. They are closely linked to each other and must be set/updated simultaneously. Currently it is possible to set iface_ and/or ifindex_ independently of each other and get an inconsistent object state.
Example 1:
- There is correctly crafted object named 'packet' (iface_="eth0", ifindex_=2);
- packet->setIface("eth1");
- IfaceMgr->send(packet);
Result: packet sent out of eth0, but not eth1.
Example 2:
- There is correctly crafted object named 'packet' (iface_="eth0", ifindex_=2);
- packet->setIndex(3); // iface_="eth0"
- IfaceMgr->send(packet);
Result: packet sent out of eth1, but not eth0.