dect
/
libnl
Archived
13
0
Fork 0
netlink Library with DECT support
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
roopa b06c23a9dd link cache: remove AF_UNSPEC check in rtnl_get_link and rtnl_get_link_by_name
This patch reverts back the AF_UNSPEC check introduced by AF_BRIDGE
changes at http://lists.infradead.org/pipermail/libnl/2012-November/000796.html

After the addition of AF_BRIDGE support, link cache can now contain objects of
type AF_BRIDGE. To make sure existing api's did not return AF_BRIDGE objects
and surprise existing callers, I introduced the check for AF_UNSPEC.

But from what Andy Wang reported, rtnl_link_get_by_name returns the first
link object with matching ifindex and that could have not only been AF_UNSPEC
but also of family AF_INET6. And his app always got an AF_INET6 object prior
to the patch that introduced the AF_UNSPEC check.

I could just add AF_INET6 family check along with AF_UNSPEC in the apis and that
should work well.

But thinking about it some more, removing the AF_UNSPEC change seems to be safer at
this point. That way this api will retain its semantics and return the first object
with matching ifindex. It could be of any supported family. The user will know if the
cache contains bridge objects, because they are available only with the cache flag
NL_CACHE_AF_ITER. Besides, if new users want to search for a specific object,
nl_cache_find is a better option.

Reported-by: Andy Wang <Andy.Wang@watchguard.com>
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
2013-01-31 10:09:12 +01:00
doc 3.2.21 release 2013-01-24 15:00:26 +01:00
etc pktloc: support to specify a shift operator for packet locations 2010-11-04 20:01:36 +01:00
include can: add helper function to get CAN bus state 2013-01-25 19:51:33 +01:00
lib link cache: remove AF_UNSPEC check in rtnl_get_link and rtnl_get_link_by_name 2013-01-31 10:09:12 +01:00
m4 doc: Check documentation generation requirements with autoconf 2012-05-09 10:06:24 +02:00
man genl: Update genl-ctrl-list(8) 2012-06-01 13:10:03 +02:00
python Enabled the use of Links as context managers. 2012-10-04 16:36:55 -04:00
src Merge pull request #29 from rmfought/natdir32 2013-01-24 08:32:35 -08:00
tests Fix test-cache-mngr test 2013-01-24 14:05:48 +01:00
.gitignore build: use AC_CONFIG_AUX_DIR 2012-11-26 21:03:14 +01:00
COPYING Update COPYING to fix FSF address 2012-01-17 12:38:37 +01:00
ChangeLog libnl 3.2.10 2012-06-06 11:43:53 +02:00
Makefile.am make: automake provides a cscope target these days 2012-12-21 13:30:21 +01:00
autogen.sh doc: Split doc/ into separate packages 2012-10-19 16:16:06 +02:00
configure.ac 3.2.21 release 2013-01-24 15:00:26 +01:00
libnl-3.0.pc.in Switch to libtool versioning system 2011-09-13 22:58:08 +02:00
libnl-cli-3.0.pc.in Add libnl-cli-3.0 to pkg-config tool 2011-10-10 11:39:24 +02:00
libnl-genl-3.0.pc.in Switch to libtool versioning system 2011-09-13 22:58:08 +02:00
libnl-nf-3.0.pc.in Switch to libtool versioning system 2011-09-13 22:58:08 +02:00
libnl-route-3.0.pc.in Switch to libtool versioning system 2011-09-13 22:58:08 +02:00