openthread / silk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

priyankaCh22 opened this issue · comments

src.send_udp_data(dst_address, port, message, src_address)

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
[2020-09-18 14:45:14,532] [silk.Dev-ABDD.wpantund] [DEBUG] wpantund[5869]: NCP => [0000000505539][INFO]-MAC-----: src:[fe80:0:0:0:54a3:362a:1f7:b8df]:19788
[2020-09-18 14:45:14,532] [silk.Dev-ABDD.wpantund] [DEBUG] wpantund[5869]: NCP => [0000000505540][INFO]-MAC-----: dst:[ff02:0:0:0:0:0:0:1]:19788

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

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

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