<p></p>
<p>I issue the command below</p>
<p><code>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</code></p>
<p>The important netlink message is reported as:<br>
<code>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</code></p>
<p>This shows only the first of the two nexthops.</p>
<p>The same message is reported by wireshark as</p>
<pre lang="Frame" data-meta="116: 88 bytes on wire (704 bits), 88 bytes captured (704 bits) on interface nlmon0, id 0"><code>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`
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/strace/strace/issues/195">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AOVBTR67A6MRY5J33TKVT7TUDXEL5ANCNFSM5EXTSKIQ">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<img src="https://github.com/notifications/beacon/AOVBTRZ5W2YRVR26RZSJFODUDXEL5A5CNFSM5EXTSKI2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4PAG44RA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/strace/strace/issues/195",
"url": "https://github.com/strace/strace/issues/195",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>