[strace/strace] Truncation of netlink/NETLINK_ROUTE RTA_MULTIPATH attribute in display (#195)
CatsMum
notifications at github.com
Sat Sep 25 13:23:10 UTC 2021
I issue the command below
`strace ip route add default scope global table 404 nexthop via 192.168.201.201 dev enp3s0u2u1 weight 1 nexthop via 192.168.202.202 dev enp3s0u2u2 weight 1`
The important netlink message is reported as:
```sendmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=[{nlmsg_len=72, nlmsg_type=RTM_NEWROUTE, nlmsg_flags=NLM_F_REQUEST|NLM_F_ACK|NLM_F_EXCL|NLM_F_CREATE, nlmsg_seq=1632573434, nlmsg_pid=0}, {rtm_family=AF_INET, rtm_dst_len=0, rtm_src_len=0, rtm_tos=0, rtm_table=RT_TABLE_UNSPEC, rtm_protocol=RTPROT_BOOT, rtm_scope=RT_SCOPE_UNIVERSE, rtm_type=RTN_UNICAST, rtm_flags=0}, [[{nla_len=8, nla_type=RTA_TABLE}, 0x194], [{nla_len=36, nla_type=RTA_MULTIPATH}, {rtnh_len=16, rtnh_flags=0, rtnh_hops=0, rtnh_ifindex=if_nametoindex("enp3s0u2u1")}, [{nla_len=8, nla_type=RTA_GATEWAY}, inet_addr("192.168.201.201")]]]], iov_len=72}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 72```
This shows only the first of the two nexthops.
The same message is reported by wireshark as
```Frame 116: 88 bytes on wire (704 bits), 88 bytes captured (704 bits) on interface nlmon0, id 0
Linux netlink (cooked header)
Linux rtnetlink (route netlink) protocol
Netlink message header (type: Add network route)
Length: 72
Message type: Add network route (24)
Flags: 0x0605
Flags: 0x0605
Sequence: 1632573434
Port ID: 0
Address family: AF_INET (2)
Length of destination: 0
Length of source: 0
TOS filter: 0x00
Routing table ID: 0
Routing protocol: boot (0x03)
Route origin: global route (0x00)
Route type: Gateway or direct route (0x01)
Route flags: 0x00000000
Attribute: RTA_TABLE
Attribute: RTA_MULTIPATH
Len: 36
Type: 0x0009, RTA_MULTIPATH (9)
0... .... .... .... = Nested: False
.0.. .... .... .... = Network byte order: False
Attribute type: RTA_MULTIPATH (9)
Data: 100000000300000008000500c0a8c9c9100000000400000008000500c0a8caca```
In the "Data" portion of the RTA_MULTIPATH attribute, both nexthops are shown:
1. `100000000300000008000500c0a8c9c9`
2. `100000000400000008000500c0a8caca`
The two interface devices involved are as follows
`...`
`3: enp3s0u2u1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
link/ether 00:0a:cd:2d:7d:98 brd ff:ff:ff:ff:ff:ff`
`4: enp3s0u2u2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
link/ether 00:0a:cd:2d:7d:99 brd ff:ff:ff:ff:ff:ff`
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/strace/strace/issues/195
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20210925/0007c6b8/attachment.htm>
More information about the Strace-devel
mailing list