Hi Stefan,

This simple patch allow me to connect from Arora to web-server in l4linux.
Can you check this solution?



2012/3/20 Stefan Kalkowski <[email protected]>

> Hi Ivan,
>
> that sounds promising! I took the liberty to open an new issue for this
> task:
>
>  https://github.com/genodelabs/genode/issues/156
>
> I would love to help you whenever possible, and as far as problems arise.
>
> Regards
> Stefan
>
> On 20.03.2012 11:39, Ivan Loskutov wrote:
> > Hello Stefan,
> >
> > Thank you for script. I tried to use nic_bridge already and got the same
> > result.
> > You've convinced me that this is the right direction and I'll continue
> > to work with nic_bridge.
> >
> >
> > 2012/3/20 Stefan Kalkowski <[email protected]
> > <mailto:[email protected]>>
> >
> >     Hello Ivan,
> >
> >     I'm afraid there is no out-of-the-box solution available by now. But
> I
> >     would think it's not that complicated to extend the nic_bridge to
> allow
> >     clients to communicate with each other. By now, the nic_bridge is
> held
> >     quite simple. It doesn't check the destination of ip-packets from
> it's
> >     clients, just brings them on-line. It only inspects and modifies dhcp
> >     requests from the clients (and vice versa).
> >
> >     To reduce work for this task I've attached a modified version of the
> >     l4linux run-script, where l4linux and our simple web-server test are
> >     started, and communicate with the network via the nic_bridge. With
> that
> >     script I can communicate with the l4linux instance anywhere from my
> LAN
> >     (and vice versa), as well as with the dummy webserver, but both
> cannot
> >     speak to each other. (The run-script requires a pre-configured
> bridged
> >     tap0 device to work properly.)
> >
> >     I hope that brings you a little bit further.
> >
> >     Best regards
> >     Stefan
> >
> >     On 20.03.2012 10:12, Ivan Loskutov wrote:
> >     > Hello.
> >     >
> >     > How to make network connection betwen server in l4linux and genode
> >     > application (for example Arora)? Has Genode implementation for
> >     this case?
> >     >
> >     >
> >     >
> >     >
> >
> ------------------------------------------------------------------------------
> >     > This SF email is sponsosred by:
> >     > Try Windows Azure free for 90 days Click Here
> >     > http://p.sf.net/sfu/sfd2d-msazure
> >     >
> >     >
> >     >
> >     > _______________________________________________
> >     > Genode-main mailing list
> >     > [email protected]
> >     <mailto:[email protected]>
> >     > https://lists.sourceforge.net/lists/listinfo/genode-main
> >
> >     --
> >     Stefan Kalkowski
> >     Genode Labs
> >
> >     http://www.genode-labs.com/ · http://genode.org/
> >
> >     Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
> >     Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
> >
> >
> ------------------------------------------------------------------------------
> >     This SF email is sponsosred by:
> >     Try Windows Azure free for 90 days Click Here
> >     http://p.sf.net/sfu/sfd2d-msazure
> >     _______________________________________________
> >     Genode-main mailing list
> >     [email protected]
> >     <mailto:[email protected]>
> >     https://lists.sourceforge.net/lists/listinfo/genode-main
> >
> >
> >
> >
> >
> ------------------------------------------------------------------------------
> > This SF email is sponsosred by:
> > Try Windows Azure free for 90 days Click Here
> > http://p.sf.net/sfu/sfd2d-msazure
> >
> >
> >
> > _______________________________________________
> > Genode-main mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/genode-main
>
> --
> Stefan Kalkowski
> Genode Labs
>
> http://www.genode-labs.com/ · http://genode.org/
>
> Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
> Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
>
>
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here
> http://p.sf.net/sfu/sfd2d-msazure
> _______________________________________________
> Genode-main mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/genode-main
>
diff --git a/os/src/server/nic_bridge/component.cc b/os/src/server/nic_bridge/component.cc
index 52f3a42..f79074e 100644
--- a/os/src/server/nic_bridge/component.cc
+++ b/os/src/server/nic_bridge/component.cc
@@ -55,7 +55,13 @@ 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);
+		// check local ip address
+		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;
 }
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Genode-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/genode-main

Reply via email to