[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MirageOS-devel] TCP client problems



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA384

Hey,

as a follow-up, using `Socket instead of `Direct works like a charm.
The problem occurs for me with the unix backend and a `Direct network
device (static tap0 10.0.0.2).

Cheers,

Hannes


On 02/28/2014 17:30, Hannes Mehnert wrote:
> Dear hackers,
> 
> I have a slight problem when trying to open a tcp connection as
> client - the mirage application is at 
> https://github.com/mirleft/ocaml-tls/tree/master/mirage-client
> (using a tap interface on my FreeBSD laptop). The only packet I can
> see on tap0 is 17:22:49.859718 ARP, Ethernet (len 6), IPv4 (len 4),
> Request who-has 10.0.0.1 (ff:ff:ff:ff:ff:ff) tell 0.0.0.0, length
> 28 0x0000:  0001 0800 0604 0001 c29d 5619 d72c 0000 0x0010:  0000
> ffff ffff ffff 0a00 0001
> 
> console output being: [17:22 hannes@aterscientia:mirage-client]
> sudo ./mir-mirage-tls-client assembled CLIENT_HELLO into a buf of
> size 41
> 
> 01 00 00 29 03 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 0a 01
> 00 plugging into tap0 with mac c2:9d:56:19:d7:2c.. Netif: connect
> tap0 Manager: connect connecting to host ARP: transmitting probe ->
> 10.0.0.1
> 
> 
> In contrast, when running a combined client and server (which 
> initiates a tcp client connection to 10.0.0.1:4433 when a
> connection to itself (10.0.0.2:80) was opened) it works fine 
> [https://github.com/mirleft/ocaml-tls/tree/master/mirage-server-client]:
>
> 
17:24:54.850357 ARP, Ethernet (len 6), IPv4 (len 4), Reply 10.0.0.2
> is-at c2:9d:56:19:d7:2c, length 28 0x0000:  0001 0800 0604 0002
> c29d 5619 d72c 0a00 0x0010:  0002 ffff ffff ffff 0000 0000 
> 17:25:03.772870 ARP, Ethernet (len 6), IPv4 (len 4), Request
> who-has 10.0.0.2 tell 10.0.0.1, length 28 0x0000:  0001 0800 0604
> 0001 00bd 4de2 ab00 0a00 0x0010:  0001 0000 0000 0000 0a00 0002 
> 17:25:03.772995 ARP, Ethernet (len 6), IPv4 (len 4), Reply
> 10.0.0.2 is-at c2:9d:56:19:d7:2c, length 28 0x0000:  0001 0800 0604
> 0002 c29d 5619 d72c 0a00 0x0010:  0002 00bd 4de2 ab00 0a00 0001
> 
> (* this is the telnet client to 10.0.0.2 port 80 *) 17:25:03.773014
> IP (tos 0x10, ttl 64, id 33970, offset 0, flags [DF], proto TCP
> (6), length 60) 10.0.0.1.54093 > 10.0.0.2.80: Flags [S], cksum
> 0x9fd0 (correct), seq 3163617414, win 65535, options [mss
> 1460,nop,wscale 6,sackOK,TS val 82118292 ecr 0], length 0 0x0000:
> 4510 003c 84b2 4000 4006 a1f7 0a00 0001 0x0010:  0a00 0002 d34d
> 0050 bc90 f886 0000 0000 0x0020:  a002 ffff 9fd0 0000 0204 05b4
> 0103 0306 0x0030:  0402 080a 04e5 0694 0000 0000
> 
> (* ARP request from mirage *) 17:25:03.773126 ARP, Ethernet (len
> 6), IPv4 (len 4), Request who-has 10.0.0.1 (ff:ff:ff:ff:ff:ff) tell
> 10.0.0.2, length 28 0x0000:  0001 0800 0604 0001 c29d 5619 d72c
> 0a00 0x0010:  0002 ffff ffff ffff 0a00 0001 17:25:03.773140 ARP,
> Ethernet (len 6), IPv4 (len 4), Reply 10.0.0.1 is-at
> 00:bd:4d:e2:ab:00, length 28 0x0000:  0001 0800 0604 0002 00bd 4de2
> ab00 0a00 0x0010:  0001 c29d 5619 d72c 0a00 0002 17:25:03.773254 IP
> (tos 0x0, ttl 38, id 58875, offset 0, flags [none], proto TCP (6),
> length 48) 10.0.0.2.80 > 10.0.0.1.54093: Flags [S.], cksum 0xb281
> (correct), seq 452860119, ack 3163617415, win 65535, options [mss
> 1460,wscale 2,eol], length 0 0x0000:  4500 0030 e5fb 0000 2606 9aca
> 0a00 0002 0x0010:  0a00 0001 0050 d34d 1afe 18d7 bc90 f887 0x0020:
> 7012 ffff b281 0000 0204 05b4 0303 0200 17:25:03.773308 IP (tos
> 0x10, ttl 64, id 33971, offset 0, flags [DF], proto TCP (6), length
> 40) 10.0.0.1.54093 > 10.0.0.2.80: Flags [.], cksum 0xdb43
> (correct), seq 1, ack 1, win 1026, length 0 0x0000:  4510 0028 84b3
> 4000 4006 a20a 0a00 0001 0x0010:  0a00 0002 d34d 0050 bc90 f887
> 1afe 18d8 0x0020:  5010 0402 db43 0000
> 
> (* this is the client connection by mirage to 10.0.0.1:4433 *) 
> 17:25:03.773385 IP (tos 0x0, ttl 38, id 46421, offset 0, flags
> [none], proto TCP (6), length 48) 10.0.0.2.11201 > 10.0.0.1.4433:
> Flags [S], cksum 0x3f53 (correct), seq 466468890, win 5840, options
> [mss 1460,wscale 2,eol], length 0 0x0000:  4500 0030 b555 0000 2606
> cb70 0a00 0002 0x0010:  0a00 0001 2bc1 1151 1bcd c01a 0000 0000 
> 0x0020:  7002 16d0 3f53 0000 0204 05b4 0303 0200
> 
> console output: [17:24 hannes@aterscientia:mirage-server-client]
> sudo ./mir-mirage-tls-server-and-client assembled CLIENT_HELLO into
> a buf of size 41
> 
> 01 00 00 29 03 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 0a 01
> 00 plugging into tap0 with mac c2:9d:56:19:d7:2c.. Netif: connect
> tap0 Manager: connect Manager: configuring Manager: Interface to
> 10.0.0.2 nm 255.255.255.0 gw [10.0.0.1]
> 
> ARP: sending gratuitous from 10.0.0.2 ARP responding to: who-has
> 10.0.0.2? ARP: transmitting probe -> 10.0.0.1 ARP: updating
> 10.0.0.1 -> 00:bd:4d:e2:ab:00 new tcp connection from 10.0.0.1
> 54093 HANDLE_RECORD (in state Initial) HANDSHAKE ...
> 
> Anything obvious that I'm missing? It seems mirage does not have
> an IPv4 address allocated (it's mac address shows up nicely in the
> first ARP request, but it's ip is 0?!?).
> 
> Any pointers are highly appreciated (fortunately I can for now use
> the combined server and client for testing purposes),
> 
> Hannes
> 
> _______________________________________________ MirageOS-devel
> mailing list MirageOS-devel@xxxxxxxxxxxxxxxxxxxx 
> http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iQIcBAEBCQAGBQJTESUjAAoJELyJZYjffCjulZAP/0w/OcU9EG8VtcR3NImPJ5Ew
xJm/t0eeckDmK/SNWj3s705XlI0oVJLzpN0MHNkbw+DGgzJu6OGCktdbOuYe0Dtp
ndigKT7lmQzfMGyl+veDB2T62FG08D2BZWFHPbX3tRZZupr6Po9FzZKZ25pGOgbL
s4b3ja/CfZ5kM8z4LElTJUWVB7MWPZSdEaia/D3/W8sJVAOkvusk1+WcQT27Lr3j
wB5rk0itgtE18XFRnVfPmOrfas+NOiY/cEm20IgR/+xbxq+DK2fxig+9HhG5z+cr
tBeTDyJ1BUa33ihtt5v3cFQBUYbUNlXKPvLF9id7Zk1HjIVOLHkIne2H7bEBfmVt
5s0monCUTeL9uaFiM9M36Rtl5VQLg8DHBtKtkIo19nMlIncpdA3d6K4isu48mKq/
chfuZKtG7+rF76LnZHs/L6qec3XhLgzQPAgMelAuB3/2K/p0HhzoVAOeD1iljsgn
OMa8vkuithl0QPZ5OF6KS7NFa8mg/BBpqpvuXVUYzv6oGVDg7kxLj9SEg3hU4sYJ
TZpfWyYMnZxMuY7u+pcc4kbhdcu0De1Dd4fPGzUfljM8+lr1oIZ2+NfwcYZTDXYN
nKrFByy7eDQ13GC1ORt7bUka9zzX71H63cepbEEuVpzbuJncnNPqknCdJHDgIZ3v
RifUm3FhfcizxhsRFrwI
=qURF
-----END PGP SIGNATURE-----

_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.