RTM_GETROUTE response missing RTA_IIF and others

Wang Jian jianjian.wang1 at gmail.com
Thu Feb 8 18:44:47 PST 2018


Try 'nl-route-list --iif=ethX'.
Probably there is no such route entry, I get nothing from above
command on my machine.

Just a guess, need expert's answer.

On Thu, Feb 8, 2018 at 5:45 PM, Thomas Lloyd
<thomas.lloyd at actual-experience.com> wrote:
> Hi All,
>
> I am using libnl in my project with libevent and it is working very nicely.
>
> I have a query about information that is being returned when I am
> making a routing request.
>
> I have based my code on nl-route-get.c and I am sending the request
> and receiving the reply.
>
> I process all elements in the reply,  around 12 months ago to now
> there seems to be a few less RTA entries.
>
> The one I was interested in is  RTA_IIF which was there when I
> originally put the example together and now seems absent.
>
> I am working on Ubuntu 16.04 LTS at the moment with all the base packages.
>
> Was this value removed or no long included in the RTM_GETROUTE Reponse?
>
> I have setup the request as follows:
>
> I have allocated a single message with type RTM_GETROUTE and Flags set
> to 0 / NONE;
>
> .rtm_family = AF_INET / 6
>
> .rtm_dst_len = 0U; - Based on manual page recommendation / also tried
> 32 as in nl-route-get.c
>
>  .rtm_src_len = 0U;  Based on manual page recommendation
>
> All others are the defaults.
>
> The process code prints all entries returned from the request known or unknown
>
> IPv4 example output:
> Req is route : Type 24 [NEW 25, DEL 26, GET 24] family 2, dstlen 32,
> srclen 0, tos 0, table 254, proto 0, scope 0, type 1, flags 512
> Routing Table is set to 254 dst is set to 216.58.210.46 OIF is set to
> 2 Preferred Source Interface is set to 10.0.2.15 gw is set to 10.0.2.2
> Cache INFO:
>     Cintref 12
>     Error 0
>     Expires: 0
>     ID: 0
>     Lastuse 300
>     TS: 0
>     TSage: 0
>     Used: 0
>
> IPv6 example output:
> Req is route : Type 24 [NEW 25, DEL 26, GET 24] family 10, dstlen 128,
> srclen 128, tos 0, table 0, proto 2, scope 0, type 7, flags 0 Routing
> Table is set to 0 dst is set to 2001:4860:4860::8888 src is set to ::
> Preferred Source Interface is set to ::1 OIF is set to 1 Priority is
> set to 4294967295
> Cache INFO:
>     Cintref 2
>     Error 4294967195
>     Expires: 0
>     ID: 0
>     Lastuse 0
>     TS: 0
>     TSage: 0
>     Used: 751
> Preference is set to 0
>
> Any pointers or help would be greatly appreciated.
>
> Thanks
>
> Tom
>
>
> --
>
> THOMAS LLOYD
> Software Developer
> Actual Experience
> Bath, UK
> HQ +44 1225 585 868 | M + 44 7799 785 021
> www.actual-experience.com | @actualwork | LinkedIn | Facebook
>
> --
> Registered Office: Actual Experience plc
> Quay House, The Ambury, Bath BA1 1UA,
> Registered No. 06838738, VAT No. 971 9696 56
>
> The information transmitted is intended only for the person or entity to
> which it is addressed and may contain confidential and/or privileged
> material. Any review, retransmission, dissemination or other use of, or
> taking of any action in reliance upon, this information by persons or
> entities other than the intended recipient is prohibited. If you received
> this in error, please contact the sender and delete the material from any
> computer. Although we routinely screen for viruses, addressees should check
> this e-mail and any attachment for viruses. We make no warranty as to
> absence of viruses in this e-mail or any attachments.
>
>
>
> _______________________________________________
> libnl mailing list
> libnl at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/libnl



More information about the libnl mailing list