Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NDB: adding a route with the via= argument results in Exception: DB execute error #1221

Open
n-peugnet opened this issue Nov 22, 2024 · 0 comments

Comments

@n-peugnet
Copy link

I tried to use NDB to add routes with the following python code:

ndb.routes.create(dst='172.18.0.2', via={'family': AF_INET, 'addr': '172.18.0.3'})

But this results in the following error, which I believe should not happen:

Exception: DB execute error: ('SELECT f_tflags , f_tos , f_scope , f_type , f_RTA_DST , f_RTA_OIF , f_RTA_PRIORITY , f_RTA_TABLE , f_RTA_VIA , f_RTA_NEWDST FROM routes WHERE f_RTA_DST = ? AND f_family = ? AND f_dst_len = ? AND f_RTA_VIA = ? AND f_target = ?', ['172.18.0.2', <AddressFamily.AF_INET: 2>, 32, {'family': <AddressFamily.AF_INET: 2>, 'addr': '172.18.0.3'}, 'localhost']) {}

I tried with a single IP string as the via= argument, instead of the dict, but then I get the error Family AddressFamily.AF_UNSPEC not supported for RTA_VIA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant