From b48a4fb069dc2853088bc6e80f6acbab97a99256 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Tue, 5 Apr 2016 10:47:14 +0300 Subject: iputils: check for IFLA_INFO_KIND presence --- accel-pppd/libnetlink/iputils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'accel-pppd/libnetlink/iputils.c') diff --git a/accel-pppd/libnetlink/iputils.c b/accel-pppd/libnetlink/iputils.c index ee536744..7ba288ef 100644 --- a/accel-pppd/libnetlink/iputils.c +++ b/accel-pppd/libnetlink/iputils.c @@ -90,7 +90,7 @@ static int store_nlmsg(const struct sockaddr_nl *who, struct nlmsghdr *n, void * if (tb[IFLA_LINKINFO]) { parse_rtattr_nested(tb2, IFLA_MAX, tb[IFLA_LINKINFO]); - if (!strcmp(RTA_DATA(tb2[IFLA_INFO_KIND]), "vlan")) { + if (tb2[IFLA_INFO_KIND] && !strcmp(RTA_DATA(tb2[IFLA_INFO_KIND]), "vlan")) { parse_rtattr_nested(tb2, IFLA_MAX, tb2[IFLA_INFO_DATA]); vid = *(uint16_t *)RTA_DATA(tb2[IFLA_VLAN_ID]); } -- cgit v1.2.3