Solved Is it possible to change the fib of the running process?

setfib(1) can be used to launch a program with a specific fib. But is it technically possible to change the fib of the process that is already running on the fly? Sort of like nice(1) can be used to start a program with a specific nice-priority, and renice(8) can be used to alter the priority when the process is already running.
 
nope.

to elaborate: the nice value is a single element of the process that affects scheduling. the FIB is a property of each socket, and affects the network, and so if you were to, e.g., use a kernel debugger to change it, it'd mess with existing socket flows when they come into the wrong FIB, and give the program an incorrect view of the network.
 
setfib(1) can be used to launch a program with a specific fib. But is it technically possible to change the fib of the process that is already running on the fly? Sort of like nice(1) can be used to start a program with a specific nice-priority, and renice(8) can be used to alter the priority when the process is already running.
Good question. Seems like the process can change FIB for itself through setfib(2) or SO_SETFIB.
 
That's unfortunate :) But that's ok, at least I'm sure that this is not possible.
to elaborate: the nice value is a single element of the process that affects scheduling. the FIB is a property of each socket, and affects the network, and so if you were to, e.g., use a kernel debugger to change it, it'd mess with existing socket flows when they come into the wrong FIB, and give the program an incorrect view of the network.
Thank you very much for the explanation!

By the way, while I'm here, I'm also interested if it's possible to find out which fib is the process using? I found Thread 94594, but it doesn't seem to answer the question. I guess it is not possible too? I guess so, because setfib(2) says:
Code:
The setfib() system call sets the associated FIB (routing table) for all sockets
opened subsequent to the call, to be that of the argument fib.
and if I understand correctly, it means that the process can actually make use of several fibs, just by calling setfib(2) before opening the next socket. So there is no a 'single fib that the process is using'.
 
hmm. we would try setfib -F $WHATEVER netstat (or sockstat), but we stopped using FIBs when VNET jails came on the scene.
 
Back
Top