shithub: riscv

Download patch

ref: 14f0eae74a9a9f5c5caebbecb11b136a12e65a22
parent: 04d6a2acecfe4fe44947da8b676f63bcd0f3c0fe
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Nov 18 12:58:10 EST 2023

devip: have findipifc() return rlock'd interface, allow to use "del" instead of "remove" for route and interface operations

The findipifc() function is kind of useless when
it returns an unlocked interface without also
providing the ifcid as the interface can be
subject to reconfiguration while unlocked.

Instead, we make findipifc() keep the interface
that it returns locked.

This is also needed for v4source() and v6source()
functions, which call ipv4local()/ipv4local()
which in turn walk the local interface chain,
and must do so under the rlock.

Also, accept the "del" verb in addition to
"remove" to keep it consistent, which also
leads to much more consistent naming in the code.
Abbreviating remove to "rem" can collide with
abbreviations for remote.