Hi
I have a libc server application that binds a UDP socket and a libc client application to test the server. For this purpose I start two vfs and bridge them using the nic_bridge component:
<start name="vfs_client"> <binary name="vfs"/> <provides> <service name="File_system"/> </provides> <config> <vfs> <dir name="socket"> <lxip ip_addr="127.0.0.2" netmask="255.0.0.0" gateway="0.0.0.0" nameserver="0.0.0.0"/> </dir> </vfs> <default-policy root="/socket" writeable="yes"/> </config> <route> <!-- ... --> </route> </start>
<start name="vfs_server"> <binary name="vfs"/> <provides> <service name="File_system"/> </provides> <config> <vfs> <dir name="socket"> <lxip ip_addr="127.0.0.1" netmask="255.0.0.0" gateway="0.0.0.0" nameserver="0.0.0.0"/> </dir> </vfs> <default-policy root="/socket" writeable="yes"/> </config> <route> <!-- ... --> </route> </start>
<start name="nic_bridge"> <provides> <service name="Nic"/> </provides> <config> <policy label_prefix="vfs_client" ip_addr="127.0.0.2" /> <policy label_prefix="vfs_server" ip_addr="127.0.0.1" /> </config> <route> <service name="Nic"> <child name="nic_drv"/> </service> <!-- ... --> </route> </start>
The server successfully binds a UDP socket to 0.0.0.0:1234 but when the client tries to connect to 127.0.0.1:1234 it gets errno 61 (connection refused).
I then tried to simplify the scenario because what I actually need is just a loopback interface. I replaced vfs_client and vfs_server by a single vfs and routed the Nic session to nic_loopback. Which leads to the same result (connection refused) when the client tries to connect.
What am I missing? Thanks, Roman
Hello Roman,
On Fri, Jan 26, 2018 at 01:54:32PM +0100, Roman Iten wrote:
I have a libc server application that binds a UDP socket and a libc client application to test the server. For this purpose I start two vfs and bridge them using the nic_bridge component:
[...]
I never tried such a scenario myself but it reminds me of one aspect of nic_router.run test. Maybe you can have a look into it. As a first glance over your config did not reveal any obvious erros, it would be best you provide a branch with your scenario and test programs at Github. So, we get a chance to play with the scenario. My first action would be to integrate nic_dump and verify guess that at least an ICMP error message travels from server to client.
Regards
Hi
On Fri, Jan 26, 2018 at 01:54:32PM +0100, Roman Iten wrote:
I have a libc server application that binds a UDP socket and a libc client application to test the server. For this purpose I start two vfs and bridge them using the nic_bridge component:
[...]
I never tried such a scenario myself but it reminds me of one aspect of nic_router.run test. Maybe you can have a look into it. As a first glance over your config did not reveal any obvious erros, it would be best you provide a branch with your scenario and test programs at Github. So, we get a chance to play with the scenario. My first action would be to integrate nic_dump and verify guess that at least an ICMP error message travels from server to client.
I tweaked run/netty_udp to use nic_loopback [1]. I can't reproduce the "connection refused" error but instead vfs crashes if KERNEL=nova:
[init -> netty-client-7070] connected no RM attachment (READ pf_addr=0xe pf_ip=0x10fc638 from pager_object: pd='init -> socket_fs' thread='ep') [init -> netty-server-7070] test in blocking mode page fault, pd='init -> socket_fs' thread='ep' cpu=0 ip=0x10fc638 address=0xe stack pointer=0xa04fef18 qualifiers=0x4 irUwp reason=1
For KERNEL=linux, there's no nullptr dereference:
[init -> netty-client-7070] connected [init -> netty-server-7070] test in blocking mode [init -> netty-client-7070] client test finished Run script execution successful.
Cheers, Roman