]> git.baikalelectronics.ru Git - kernel.git/commit
net: check type when freeing metadata dst
authorDavid Lamparter <equinox@diac24.net>
Fri, 18 Aug 2017 12:31:35 +0000 (14:31 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Aug 2017 17:57:38 +0000 (10:57 -0700)
commit0fe994a1971bb624c26efa5f9fda6f0765eba638
tree6148a7720992d25315653e3b83517633e41737e1
parent1ad23e7d336abb4969f79ab21b6dbc63be78286b
net: check type when freeing metadata dst

Commit c0d65610445f ("net: store port/representator id in metadata_dst")
added a new type field to metadata_dst, but metadata_dst_free() wasn't
updated to check it before freeing the METADATA_IP_TUNNEL specific dst
cache entry.

This is not currently causing problems since it's far enough back in the
struct to be zeroed for the only other type currently in existance
(METADATA_HW_PORT_MUX), but nevertheless it's not correct.

Fixes: c0d65610445f ("net: store port/representator id in metadata_dst")
Signed-off-by: David Lamparter <equinox@diac24.net>
Cc: Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: Sridhar Samudrala <sridhar.samudrala@intel.com>
Cc: Simon Horman <horms@verge.net.au>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dst.c