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

[MirageOS-devel] TCP client problems



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

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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iQIcBAEBCQAGBQJTEMfAAAoJELyJZYjffCjuPxcP/07LaW3YHHBILzg2LqY5KmNp
rZSHHkQMJ3vrU7b25mXTSyR8zdQmDCJSZ6NgkGJbVBl9ocWx+ht1TDtvUL75yVSk
Sc5r7iRK+K5FMEeMm5Z1ZB1apxGRBZMgefxvK4IPdg08bO7r39DUuFcJaQW8YBhV
K32FAxhOMKe2lwFWXhxKsuRD2j8lnSN1Fd3cFJ4W/mg7dyFW578uGTa9TWm3t6jt
TKHYJujDZxmgXX1UEYZHJXZchm8bvh4m01UVrcrjfz3OPysAnkcEoTnOWph227ii
tnEOicBtza05B4Ao3OUxqlj52O+dYgJ1rA1PwhdwcWw7ZrK311xflNlRmtOdIbc3
AoomkLcy2syiAtNJORpgnEyQoT2EvmDsJ7EY3PP+CxxwTSGLgo4vAA9Ww/SqWgoa
NdUSvBXNVa6kbvl1XrscaeIGP4qRfn8kcIye1E4YYIpsCbFnZJGWMIgcNM7jIvF1
sqDH+jYgGsygqCejWEnJPy/7MA8dYs4Sj2nPHuERvwyYFGH2JjV1UJTeH2t78Eq3
xwFuK89Prtz08KHV2YCELfFrKX9imsamnjHasLtVA+L/XJ3WOv6rDHEKgzaXfJYk
cK5QztZM2OChisiF7XmR633afbfLUy8zjosrXyYg33GR3x/hpIJzLB31396FlNyC
PkLkfuz8eA/eZHtGlmnX
=bn23
-----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®.