Skip to content

Issue 1825: Used int64_t instead of uint32_t for ifindex within setIndex and getIndex

bglsriram requested to merge bglsriram/kea:master into master

Closes #1825 (closed).

https://github.com/isc-projects/kea/commit/2a453ec2f66ea4681283df5a4d9e99410a974507 modified ifindex_ to int64_t from an earlier int type and introduced methods: resetIndex() which sets ifindex_ to -1 and indexSet() which checks if ifindex_ is greater than equal to 0

However, the getIndex() and setIndex() methods still work with a uint32_t ifindex and this causes ifindex to be truncated for the users of these 2 methods.

So, if a resetIndex() is followed either by getIndex() OR setIndex()[for example - copying of pkt], indexSet() invocation on the same pkt will return true.

This MR fixes the data type of ifindex to int64_t for getIndex() and setIndex() methods

Edited by Andrei Pavel

Merge request reports