Hi,

I have a plugin node in which I want to process some received packets. When
a packet is destined to an IP address that is configured on a loopback
interface, I want to be able to lookup some data based on the sw_if_index
of the loopback interface. Packets that are sent to the loopback address
are received on hardware interfaces, so I cannot look at
sw_if_index[VLIB_RX] in the vnet buffer opaque data to find out that the
packet destination address belongs to a loopback. I was hoping that
ip.adj_index[VLIB_TX] would contain data that would help me do what I'm
trying to do, but that does not seem to be the case. In ip4-lookup, a FIB
entry is found which matches the loopback address. The index of the
adjacency for the path is stored in ip.adj_index[VLIB_TX]. But the stored
value is subsequently overwritten in ip4-local during the call to
ip4_local_check_src(). That function does a lookup on the source IP address
and overwrites both ip.adj_index[VLIB_RX] and ip.adj_index[VLIB_TX] with
the index retrieved by the lookup.

I can work around this in my plugin code if I need to but it would be nice
to be able to use the adjacency data that was retrieved by ip4-lookup.
Would it break anything if ip4_local_check_src() only updates
ip.adj_index[VLIB_RX] and leaves the contents of ip.adj_index[VLIB_TX]
intact?

Thanks,
-Matt
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#13291): https://lists.fd.io/g/vpp-dev/message/13291
Mute This Topic: https://lists.fd.io/mt/32066650/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to