I have to modify all routes using one specific dev. Not even modify, just append a correct src ัะพ the end of a route, like this:
x.x.x.x(destination network) via y.y.y.y(MYDEV ip) dev MYDEV(network device) proto zebra
To this:
x.x.x.x(destination network) via y.y.y.y(MYDEV ip) dev MYDEV(network device) proto zebra src z.z.z.z(correct src ip, needed for correct transit routing throw y.y.y.0/23 network)
Of course, i can do it by simple bash script and crond it, but my question is:
Can i append correct src to all the routes, that uses MYDEV by using ip rule and routing tables?
PS: I cannot modify this routes directly by zebra because of complicated network configuration(cannot match specific route-map).