ipmroute: Prevent overlapping storage of `filter` global
Subsystems (2)
PATCH 1/1 ipmroute: Prevent overlapping storage of `filter` global
This variable has the same name as struct xfrm_filter filter in ip/ipxfrm.c, but overrides that definition since struct rtfilter is larger.
This is visible when built with -Wl,--warn-common in LDFLAGS:
/usr/bin/ld: ipxfrm.o: warning: common of `filter' overridden by larger common from ipmroute.o
Signed-off-by Michael Forney <[email protected]>
---
I'm not sure if this causes any problems in practice, but it seems unintended.
ip/ipmroute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
ip/ipmroute.c +1 -1
@@ -46,7 +46,7 @@ static void usage(void)exit (-1 ); } -struct rtfilter { +static struct rtfilter { int tb; int af; int iif;
Signature · 1 line
2.20.1
Stephen Hemminger
AppliedQuoted 9 lines · On Sun, 16 Jun 2019 14:46:02 -0700 Michael Forney <[email protected]> wrote:
This variable has the same name as
struct xfrm_filter filterinip/ipxfrm.c, but overrides that definition sincestruct rtfilteris larger.This is visible when built with -Wl,--warn-common in LDFLAGS:
/usr/bin/ld: ipxfrm.o: warning: common of `filter' overridden by larger common from ipmroute.oSigned-off-by Michael Forney <[email protected]>
Applied