openthread / silk

Apache License 2.0
5 stars 10 forks source link

getting netcat error "nc: getaddrinfo: Name or service not known" during udp msg transmit/receive #68

Open priyankaCh22 opened 4 years ago

priyankaCh22 commented 4 years ago

https://github.com/openthread/silk/blob/3b29c48c1767132213be23a6ca7abe37df0b261d/silk/tests/openthread/ot_test_off_mesh_route_traffic.py#L227

priyankaCh22 commented 4 years ago

Error log snippet:

[2020-09-18 14:45:13,043] [silk.Dev-5B97] [DEBUG] sudo ip netns exec ttyACM8 nc -6lu 10060 [2020-09-18 14:45:14,002] [silk.Dev-F34B.wpantund] [DEBUG] wpantund[5879]: NCP => [0000000505093][INFO]-MAC-----: Sent data poll, fp:no [2020-09-18 14:45:14,003] [silk.Dev-ABDD.wpantund] [DEBUG] wpantund[5869]: NCP => [0000000505013][INFO]-MAC-----: Rx data poll, src:0x7c01, qed_msgs:0, rss:-26, ack-fp:0 [2020-09-18 14:45:14,048] [silk.Dev-F34B] [DEBUG] Making system call for netns-exec [2020-09-18 14:45:14,048] [silk.Dev-F34B] [DEBUG] sudo ip netns exec ttyACM5 nc -6u -M 64 -s fd00:1234::d1f4:b0f7:f991:d7e2%ttyACM5 fd00:abba::1 10060 <<< "ChxsZNCEkm" [2020-09-18 14:45:14,074] [silk.Dev-F34B] [DEBUG] [stdout] nc: getaddrinfo: Name or service not known [2020-09-18 14:45:14,523] [silk.Dev-ABDD.wpantund] [DEBUG] wpantund[5869]: NCP => [0000000505534][INFO]-MLE-----: Send Advertisement (ff02:0:0:0:0:0:0:1) [2020-09-18 14:45:14,531] [silk.Dev-ABDD.wpantund] [DEBUG] wpantund[5869]: NCP => [0000000505539][INFO]-MAC-----: Sent IPv6 UDP msg, len:91, chksum:4141, to:0xffff, sec:no, prio:net

tzm41 commented 4 years ago

Thinking we might need -p for source port in the send command

tzm41 commented 4 years ago

The other thing to consider is how the code formatted LLA address into full address with the %ttyACM5 etc. Maybe not very robust there?

priyankaCh22 commented 4 years ago

Adding netns %ttyACM5 is only required for src_addr.LLA

Adding -p would help in test009_insecure_traffic_join.py which require sender and receiver port