jech / babeld

The Babel routing daemon
http://www.irif.fr/~jch/software/babel/
MIT License
385 stars 92 forks source link

Add functions to delete filters from an interface #95

Open PolynomialDivision opened 2 years ago

PolynomialDivision commented 2 years ago

Adding a delete function at runtime allows the babeld ipc to add and remove interfaces with filters. Further, it also allows more dynamic routing selection.

jech commented 2 years ago

I'm extremely confused. This PR appears to add two functions that are not used anywhere. Is part of the patch missing?

PolynomialDivision commented 2 years ago

It's used by the IPC I added in openwrt: https://github.com/openwrt/routing/pull/911/files

jech commented 2 years ago

I see. It feels weird to add dead code to babeld, so I'm hesitating between adding the funcitonality to babeld's native IPC, or to ask you to maintain it in your fork. Do you have any opinions?

PolynomialDivision commented 2 years ago

I can maintain it as patch. I just wanted to get some feedback from you if I can do such things. :)

jech commented 2 years ago

The code looks good to me.

Perhaps you could explain why you need this functionality, so we can think together whether there's a better solution to your problem?

PolynomialDivision commented 2 years ago

I'm adding and removing dynamically interfaces. Sometimes they even have the same name. I'm also adding filters on them. When I remove now an interface, I want to also to remove the filters. Maybe a clean removing of an interface and its filters would be some good solution for me.

jech commented 2 years ago

Maybe a clean removing of an interface and its filters would be some good solution for me.

You got it. Give me a few days.

PolynomialDivision commented 2 years ago

Thanks! :)

PolynomialDivision commented 2 years ago

Any news? :)