Skip to content

Conversation

@AltraMayor
Copy link
Owner

This pull request adds information to some of the error messages of the Lua lpmlib to help diagnoses in production, fixes a bug while passing IPv6 addresses from Lua policies to lpmlib, and makes lpmlib accepting IPv6 addresses in any type.

Before this patch, Lua lpmlib would wrongly read IPv6 addresses
coming from Lua policies. This behavior would lead to a number of
problems such as not finding the IPv6 address during lookups,
returning wrong masks, and adding wrong addresses to
an IPv6 LPM table.

Not only does this patch fix the bug described above, it also
make easier for Lua policies to pass IPv6 addresses to lpmlib.
From now on, all functions in lpmlib that receive IPv6 addresses
accept IPv6 addresses as struct in6_addr, references to
struct in6_addr, or pointers to struct in6_addr.
Since casting is no longer needed to pass IPv6 addresses to
Lua lpmlib, this patch drops them from the example policy.
@AltraMayor AltraMayor added bug enhancement Production requirement Either the issue is solved, or Gatekeeper doesn't work in production labels Jul 10, 2021
@AltraMayor AltraMayor added this to the First deployment milestone Jul 10, 2021
@AltraMayor
Copy link
Owner Author

Tested on our XIA1 server.

@AltraMayor AltraMayor merged commit 41c1733 into master Jul 10, 2021
@AltraMayor AltraMayor deleted the gt_if branch July 10, 2021 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug enhancement Production requirement Either the issue is solved, or Gatekeeper doesn't work in production

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants