Extend nic_bridge to support internal traffic

Fixes #156
This commit is contained in:
Ivan Loskutov 2012-03-26 13:18:28 +04:00 committed by Norman Feske
parent 30dc1d83da
commit 3cfbc53754
1 changed files with 6 additions and 1 deletions

View File

@ -55,7 +55,12 @@ bool Session_component::Tx_handler::handle_arp(Ethernet_frame *eth, Genode::size
new (eth->data()) Arp_packet(size - sizeof(Ethernet_frame));
if (arp->ethernet_ipv4() &&
arp->opcode() == Arp_packet::REQUEST) {
arp->src_mac(_mac);
Ipv4_address_node *node = Vlan::vlan()->ip_tree()->first();
if (node)
node = node->find_by_address(arp->dst_ip());
if (!node) {
arp->src_mac(_mac);
}
}
return true;
}